gpt4 book ai didi

asp.net-mvc - 映射片段 Entity Framework 错误

转载 作者:行者123 更新时间:2023-12-02 17:58:28 24 4
gpt4 key购买 nike

我正在开发一个 ASP.NET MVC4 应用程序(数据库优先方法),现在我从数据库更新了模型,然后我收到了此错误:

Problem in mapping fragments starting at line 1106:Potential runtime violation of table Trn_BenchProficiency's keys (Trn_BenchProficiency.BenchNumber): Columns (Trn_BenchProficiency.BenchNumber) are mapped to EntitySet Trn_BenchProficiency's properties (Trn_BenchProficiency.BenchNumber) on the conceptual side but they do not form the EntitySet's key properties (Trn_BenchProficiency.AssessedDate, Trn_BenchProficiency.BenchNumber, Trn_BenchProficiency.Proficiency, Trn_BenchProficiency.SkillAllignmentID, Trn_BenchProficiency.SkillID).

当我双击错误 Visual Studio 时显示以下内容:

enter image description here

请大家帮帮我,这是什么问题?我真的找不到错误。

最佳答案

尝试删除 edmx 图表中的表格并更新您的图表,然后再次添加表格。保存并重建您的解决方案。

当我改变表的关系时,我总是遇到这种情况。

关于asp.net-mvc - 映射片段 Entity Framework 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26520560/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com