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

错误描述

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

 

解决方案

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

 

posted @ 2019-06-21 16:15  薄心之心  阅读(11776)  评论(0编辑  收藏  举报