简体   繁体   English

实体框架5:为关联表创建实体类型

[英]Entity framework 5 : create entity type for association table

I'm using entity framework 5 , the problem is that EF5 does not create EntityType for tables which contains only foreign keys which is not the case with EF4 我正在使用实体框架5,问题是EF5不会为仅包含外键的表创建EntityType,而EF4则不是

does anyone know how to solve this problem ? 有谁知道如何解决这个问题?

to workaround, i added a column to tables containing only foreign keys, i generate the edmx, and i removed them after from my edmx and the DB 要解决此问题,我在仅包含外键的表中添加了一个列,生成了edmx,然后从edmx和数据库中删除了它们。

thank's in advance for your help 在此先感谢您的帮助

之所以没有创建它们,是因为它们是不必要的-您应直接处理关系两端的导航属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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