原文: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