我的ASP.MVC项目中有一个存储过程,它只从数据库中获取数据。我已将其映射到实体框架中。数据库中的数据变化非常快,因此我的存储过程的执行有时会失败,并显示错误:
"System.Data.SqlClient.SqlException:The transaction operation cannot be performed because there are pending requests working on this transaction"
在EF中执行我的程序之前,我可以检查是否有任何待处理请求正在运行吗?
或许有人可以就此问题向我提出一些其他解决方案?