且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ADO.NET Entity Framework:更新向导不会添加表

更新时间:2023-01-19 10:28:43

设计图面与实体模型不同.EDMX 中的映射中可能有一个未出现在设计图面上的表.以 XML 格式查看文件以查看是否是这种情况.在这种情况下,更新向导将不允许您重新添加表,因为它们已经是实体模型的一部分.因此,一般来说,更新向导对实体模型的了解比对设计表面的了解要多,本身.

The design surface is different from the entity model. It is possible to have a table in the mapping in your EDMX which does not appear on the design surface. View the file as XML to see if this is the case. In this case, the Update Wizard will not allow you to re-add the tables, since they are already part of the entity model. So, generally speaking, the Update Wizard knows more about your entity model than it does about the design surface, per se.

我不认为这正是您所处的情况,但它应该为您提供解决方案的总体思路:进入 XML 并查找对相关表的引用.

I don't think that's exactly the situation you're in, but it should give you the general idea for the solution: go into the XML and look for references to the tables in question.