实体框架逆向工程代码优先:在生成的代码中缺少外键关系 [英] Entity Framework Reverse Engineering Code First: missing the foreign key relationships in the generated code
本文介绍了实体框架逆向工程代码优先:在生成的代码中缺少外键关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试先使用EF逆向工程师代码从数据库生成代码,
但是,自动生成的代码缺少一些外键关系。
原因?
I try to use EF Reverse Engineer Code First to generate code from a Database,
However, the auto-generated code missed some foreign key relations.
What could be the reason?
推荐答案
这是设计器中的错误,我在此处进行了 https://entityframework.codeplex.com/workitem/667
您可以下载EF Tools 6.1.2或更高版本,其中包含解决。有关下载链接,请参见ADO.NET博客上的博客文章。
This is a bug in the designer, that I fixed here https://entityframework.codeplex.com/workitem/667 You can download the EF Tools version 6.1.2 or later, which contains the fix. See blogpost on the ADO.NET blog for download links
这篇关于实体框架逆向工程代码优先:在生成的代码中缺少外键关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文