实体上缺少导航属性 [英] Missing navigation properties on Entity
问题描述
EF4正在从数据库生成我的模型,但其中一个实体缺少其导航属性。从数据库生成模型时没有错误。表关系和约定也与已正确映射的所有其他
表完全相同。
它似乎影响了一个实体和所有实体它应该映射到(缺少反向导航属性)。我已经尝试删除映射并再次尝试,但这个实体似乎是一个问题。
如何调试问题?
我已经仔细检查了数据库,并且关系设置正常。此外,有问题的实体有一个主键和几个字段(没有任何异常)。共有18个表格,除了这个表格之外,它们都已正确映射。
感谢您提供任何帮助或指示。
到目前为止,我已经使用EF4几周没有任何问题。
Hello Andrew,
< span style ="font-size:12pt"> 欢迎来到EF论坛&感谢您发布该问题!
我以前从未见过这样的问题。
如果方便的话,你可以给我发一个demo和db文件来重现这个问题吗?
非常感谢你!
我的邮箱:
v-micsun@microsoft.com 。
< span style ="font-size:12pt"> 美好的一天!
最好的问候,
Lingzhi Sun
MSDN订阅者支持
在论坛
如果您对我们的支持有任何反馈意见,请联系< span style ="color:#1f497d">
msdnmg@microsoft.com
EF4 is generating my Model from the database, but one of the Entities is missing its navigation properties. There are no errors, when the Model is generated from the database. Also the table relationships and conventions are exactly the same as all the other tables that have been mapped correctly.
It seems like it is affecting the one Entity, and all the Entities it should be mapped to (which are missing the reverse navigation property). I have tried deleting the mapping and trying again, but this one Entity seems to be a problem.
How do I go about debugging the problem?
I have double checked the database, and the relationships are setup fine. Also Entity in question has a primary key, and a few fields (nothing out of the ordinary). There are 18 tables in total, and they have all been mapped correctly apart from this one.
Thanks for any help or pointers.
I have been using EF4 for a couple of weeks without no problems until now.
Hello Andrew,
Welcome to EF forum & thank you for posting the issue!
I have never seen such a problem before. Could you please send me a demo and db file to repro this issue if it is convenient for you? Thank you so much!
My mail: v-micsun@microsoft.com.
Good day!
Best Regards,
Lingzhi SunMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
这篇关于实体上缺少导航属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!