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

2021/5/19 10:56:59

本文主要是介绍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.

 

解决方案

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

 



这篇关于EntityFramework:An error occurred while executing the command definition. See the inner exception fo的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程