错误描述

调用EF中的FirstOrDefault()时,报错误:An error occurred while executing the command definition. See the inner exception for details.

 

解决方案

一般是代码中的表或者字段无法与数据库对应导致,检查代码中的表名称字段名称与数据库表或字段名称是否一致。

参考连接:https://stackoverflow.com/questions/3986160/an-error-occurred-while-executing-the-command-definition-see-the-inner-exceptio

 

转载于:https://www.cnblogs.com/bossing/p/11065264.html

更多推荐