捕捉到 System.InvalidOperationException
_HResult=-2146233079
_message=意外的连接状态。在使用包装提供程序时,请确保在已包装的 DbConnection 上实现 StateChange 事件。
HResult=-2146233079

解决参考:

https://stackoverflow.com/questions/4867602/entity-framework-there-is-already-an-open-datareader-associated-with-this-comma

https://stackoverflow.com/questions/20693216/there-is-already-an-open-datareader-associated-with-this-connection-which-must-b

EF There is already an open DataReader associated with this Command的更多相关文章

  1. There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework

    Fixing the "There is already an open DataReader associated with this Command which must be clos ...

  2. 在实体对象中访问导航属性里的属性值出现异常“There is already an open DataReader associated with this Command which must be closed first”

    在实体对象中访问导航属性里的属性值出现异常“There is already an open DataReader associated with this Command which must be ...

  3. 关于MultipleActiveResultSets属性导致的There is already an open DataReader associated with this Command which must be closed first的解决方法

    执行SqlDataReader.Read之后,如果还想用另一个SqlCommand执行Insert或者Update操作的话,会得到一个错误提示:There is already an open Dat ...

  4. C#.net mysql There is already an open datareader associated with this command引发的问题

    [参考]There is already an open datareader associated with this command引发的问题 我在语句中并未使用 DataReader,未何也提示 ...

  5. 多线程下,多次操作数据库报错,There is already an open DataReader associated with this Command which must be closed first.

    原文:https://www.cnblogs.com/sdusrz/p/4433108.html 执行SqlDataReader.Read之后,如果还想用另一个SqlCommand执行Insert或者 ...

  6. error 'there is already an open datareader associated with this command which must be closed first'

    This can be easily solved by allowing MARS in your connection string. Add MultipleActiveResultSets=t ...

  7. There is already an open DataReader associated with this Command which must be closed first

    通常出现在嵌套查询数据库(比如在一个qry的遍历时,又进行了数据库查询) 通过在连接字符串中允许MARS可以轻松解决这个问题. 将MultipleActiveResultSets = true添加到连 ...

  8. EF 常见异常总结

    问题:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invoca ...

  9. EF core 性能调优

    Entity Framework Core performance tuning – a worked example Last Updated: February 25, 2019 | Create ...

随机推荐

  1. .NET Core开发日志——Runtime IDentifier

    .NET Core对于传统.NET开发人员而言是既熟悉又陌生的新平台,所以有时遇上出乎意料的事情也纯属正常情况.这时只需点耐心,多查查资料,努力找到原因,也未尝不是件有意义的体验. 比如当建完一个最简 ...

  2. 制作tomcat重启.bat文件

    环境是在windows下,linux不知道,没有尝试过,有机会去试试哈哈 首先创建一个restart.bat文件 创建在哪里看你开心咯 然后用记事本打开 输入以下源代码: @echo off cd / ...

  3. jdbc --- javabean

    第一部分: javaBean 类  要和数据库表的字段一一对应 package com.ljs.bean; public class UserBean { private int id; privat ...

  4. 最详细最全的redis配置文件解释

    转载自:http://www.cnblogs.com/zhang-ke/p/5981108.html #redis.conf# Redis configuration file example.# . ...

  5. set,env,export,set -x,set -e;

    set 用来显示本地变量 env 用来显示环境变量 export 用来显示和设置环境变量 set 显示当前shell的变量,包括当前用户的变量 env 显示当前用户的变量 export 显示当前导出成 ...

  6. ASP.NET MVC导出excel npoi

    使用npoi组件 前端代码: @Html.ActionLink("导出Excel", "ExportWarehouseInOutDetailTable", ne ...

  7. Xib给特定view添加手势

    步骤1.拖拽手势注意:拖拽到First Responder下方,成功后会出现一个分类Objects(如图 拖拽成功后会多出一个分类Objects ) 步骤2.给需要的view绑定手势控件 拖拽gest ...

  8. 主备归档不一致导致的RMAN-08137无法清理归档解决方案

    值班夜里接到归档目录满的告警,执行删除脚本发现报错 RMAN-08137: WARNING: archived log not deleted, needed for standby or upstr ...

  9. Joda Time - 强大易用的日期和时间库

    Joda-Time提供了一组Java类包用于处理包括ISO8601标准在内的date和time.可以利用它把JDK Date和Calendar类完全替换掉,而且仍然能够提供很好的集成. Joda-Ti ...

  10. java之map的基本介绍

    map简介 在讲解Map排序之前,我们先来稍微了解下map.map是键值对的集合接口,它的实现类主要包括:HashMap,TreeMap,Hashtable以及LinkedHashMap等.其中这四者 ...