This code sample demonstrates how to perform basic operations with entities linked by a many-to-many relation.
Using join or linking tables in your database is a common practice, but how do you represent these relationships in your Entity Data Model, and then work with the entities in code?
A many-to-many relation can be with payload or without payload. If the join table in the database contains no extra payload then the EDM Designer defines only an association in place of a "join entity". If the table contains payload (i.e., additional properties other than the foreign keys) then an entity is created for the table.
The samples show how to navigate, add, and delete navigation properties in both scenarios where entities are linked by a many-to-many with payload or by a many-to-many without payload relationship.
Note: While in the relationship with payload you must explicitly manipulate the linking table, that's not necessary in the many-to-many without payload relationship.