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
只需要确定一下使用哪个字段,一边做一下同步修改,使用相同字段就可以了。

posted @ 2022-01-25 12:28  清和时光  阅读(1904)  评论(0编辑  收藏  举报