开发者

Explicit many to many join table in Entity Framework 4

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 开发者_如何学Pythonit possible to tell EF (and the designer) to explicitly create the join table and make it usable in code?

Thanks


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:

  • How to expose the join table in many to many relation
  • How to get Entity to Table mapping for many to many relations
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜