简体   繁体   中英

Entity Framework 6 does not create the mapping tables

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM