Explicit many to many join table in Entity Framewo

2019-04-08 22:50发布

By default EF hides a many to many join table that does not contain additional data than the foreign keys to the joined tables.

Is it possible to tell EF (and the designer) to explicitly create the join table and make it usable in code?

Thanks

1条回答
爷、活的狠高调
2楼-- · 2019-04-08 22:57

No EF designer will not add this entity for you. If you want junction table exposed you must manually delete created relation and add junction table's entity and two one-to-many FK relations. Here are related questions with step by step guide:

查看更多
登录 后发表回答