【问题标题】:Unable to update edmx diagram无法更新 edmx 图
【发布时间】:2017-04-21 08:21:03
【问题描述】:

我无法更新我的 edmx 图表。这些变化没有反映出来。 我尝试了这种方法,但它似乎对我不起作用。有什么帮助吗?

我试过的方法:

Go to Model browser. MyStoreProc is the name of the stored procedure (as an example). MyStoreProc will appear in 3 places.

1st place- Under Complex Types-> as MyStoreProc_result
2nd Place- Under Function Imports -> as MyStoreProc
3rd Place - Under Stored Procdures/ Functions -> as MyStoreProc
Delete all three from model. Save the edmx (by clicking in the window then ctrl+S). Then right click and click update the model from database. Then add the updated stored procedure and Save again.

【问题讨论】:

  • 不认为您需要删除它才能从数据库更新?很确定你可以双击 edmx,然后在图表中,右键单击并从数据库更新模型,它应该就可以工作了吗?
  • 它实际上不起作用。所以我尝试了上面的方法
  • 不工作怎么办?你得到一个错误?没有理由不应该,除非它没有以某种方式正确设置。您是否自定义了 EDMX 的 XML 或其他内容?
  • 就像我看不到我在数据库中添加的那两个新字段。它没有反映在复杂类型中。我没有尝试自定义 xml
  • 它们是输出字段,还是输入字段?您是否尝试过删除并重新创建 EDMX 和相关资源(当然要先备份!)?也许某些东西只是损坏了。您确定连接到正确的数据库实例吗? (例如,也许您在 Dev 中进行了更改,但 DB 指向 Test)

标签: c# sql entity-framework edmx


【解决方案1】:

我的问题中提供的解决方案是正确的。由于我系统中的多个数据库存在问题,我无法更新 edmx。感谢您的所有帮助。

【讨论】:

    猜你喜欢
    • 2011-09-09
    • 1970-01-01
    • 2016-02-06
    • 1970-01-01
    • 2018-02-17
    • 2012-02-28
    • 2014-10-27
    • 2016-01-08
    • 1970-01-01
    相关资源
    最近更新 更多