Reputation: 111
I am using an Entity Framework 6 ,I have some table as a mapping tables in the database - to map many to many tables - does not created as an entity when I create the model. what is the problem will be?
that's the tables:
Prop:
PK-Code
PropCh:
PK-CHID
and the mapping table:
Ch_Prop:
PK-CHID
PK-Code
Upvotes: 0
Views: 379
Reputation: 28434
In your schema, the mapping table has no properties other than the FKs of the related entities, what makes it so to say a pure join table.
For this reason, EF does not creates a class to represent that "model", as entries of the table will be internally represented by the state of the navigation properties among the related models.
In most cases this isnt an issue, as normally entities are pre-loaded before being associated through modifications of their navigation properties.
Upvotes: 1