使用EF操作数据必须设置主键

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

数据库没有主键

【1】添加主键

【2】在edmx中更新

猜你喜欢

转载自blog.csdn.net/weixin_42434300/article/details/81704174