Unable to update the EntitySet 'Relationship' because it has a DefiningQuery and no element exists in the 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."}

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