Entity Framework 4 错误

错误异常:

Unable to update the EntitySet 'XXX' because it has a DefiningQuery and no <InsertFunction> 

element exists in the <ModificationFunctionMapping> element to support the current operation.

解决方案

在使用AdO.NET Entity Framework的时候,你可能会遇到这个问题,这个问题就是告诉你,你使用的“XXX”这张表在数据库没有定义主键,

只要设置了主键,就不会出现这个异常或这个错误了。

原文地址:https://www.cnblogs.com/w2011/p/3002154.html