原文:EF更新时出错,An error occurred while updating the entries. See the inner exception for details

在使用EF进行更新数据时出错,报出的异常是 An error occurred while updating the entries. See the inner exception for details 最开始一直不知道在哪里,可以看到这个 inner exception ,最后才发现,在异常弹出窗的下面,有一个查看详情。可以在这个页面里面看到具体的错误信息。如下: 找到了具体的错误信息,这 ...

2014-01-01 18:50 0 5359 推荐指数:

查看详情

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

报错信息: 大概意思就是更新数据库出错了,字段 StatusId 无效 解决方案: 检查后发现程序里面数据模型是 StatusId ,而实际数据库字段已经改名字为 StatusValues 只需要确定一下使用哪个字段,一边做一下同步修改,使用相同字段就可以了。 ...

Tue Jan 25 20:28:00 CST 2022 0 1278
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM