Unable to update the EntitySet 'Relationship' because it has a DefiningQuery and no <DeleteFunction> element exists in the <ModificationFunctionMapping> element to support the current operation

在使用SQLite Entity Framework操作数据删除的时候出现了如下异常

An error occurred while updating the entries. See the inner exception for details.

inner exception的内容是:Unable to update the EntitySet 'Relationship' because it has a DefiningQuery and no element exists in the element to support the current operation."}

这是由于数据库中没有为表添加主键,只需要添加主键就能修正这个问题。

posted @ 2017-07-03 19:39  yangsofter  阅读(680)  评论(0编辑  收藏  举报