【问题标题】:Unable to update the EntitySet无法更新实体集
【发布时间】:2013-01-04 13:58:56
【问题描述】:

以下代码:

sistema_log_openedPdfs entity = new sistema_log_openedPdfs();
entity.idUser = guid;
entity.path = fullAbsPath;
context.sistema_log_openedPdfs.Add(entity);
context.SaveChanges();

我得到了这个疯狂的例外:

[UpdateException: Unable to update the EntitySet 'sistema_log_openedPdfs because it has a DefiningQuery and no <InsertFunction> element exists in the<ModificationFunctionMapping> element to support the current operation.]

寻求帮助我找不到任何帮助。

【问题讨论】:

    标签: c# asp.net .net asp.net-mvc asp.net-mvc-4


    【解决方案1】:

    您是否忘记为sistema_log_openedPdfs 创建主键???

    【讨论】:

    • 是的,没有创建主键。谢谢
    猜你喜欢
    • 2015-11-08
    • 1970-01-01
    • 1970-01-01
    • 2019-10-19
    • 1970-01-01
    • 2016-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多