其他分享
首页 > 其他分享> > EntityFramework:An error occurred while executing the command definition. See the inner exception fo

EntityFramework:An error occurred while executing the command definition. See the inner exception fo

作者:互联网

错误描述

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

 

解决方案

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

 

标签:definition,exception,occurred,executing,See,inner,error,details
来源: https://blog.51cto.com/u_7034817/2785549