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


报错信息:

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'StatusId'.

大概意思就是更新数据库出错了,字段 StatusId 无效

解决方案:

检查后发现程序里面数据模型是 StatusId ,而实际数据库字段已经改名字为 StatusValues
只需要确定一下使用哪个字段,一边做一下同步修改,使用相同字段就可以了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM