an error occurred while saving the entity changes. see the inner exception for details.

这个报错出现在对实体进行增加操作时,进行提交动作时,数据库中主键与增加的实体主键有重复冲突,解决方法就是查看是否在未初始化实体的时候已经存在了其他地方赋值的id。

你可能感兴趣的:(.net)