EF There is already an open DataReader associated with this Command
捕捉到 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的更多相关文章
- 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 ...
- 在实体对象中访问导航属性里的属性值出现异常“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 ...
- 关于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 ...
- C#.net mysql There is already an open datareader associated with this command引发的问题
[参考]There is already an open datareader associated with this command引发的问题 我在语句中并未使用 DataReader,未何也提示 ...
- 多线程下,多次操作数据库报错,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或者 ...
- 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 ...
- There is already an open DataReader associated with this Command which must be closed first
通常出现在嵌套查询数据库(比如在一个qry的遍历时,又进行了数据库查询) 通过在连接字符串中允许MARS可以轻松解决这个问题. 将MultipleActiveResultSets = true添加到连 ...
- EF 常见异常总结
问题:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invoca ...
- EF core 性能调优
Entity Framework Core performance tuning – a worked example Last Updated: February 25, 2019 | Create ...
随机推荐
- deepin中idea中文乱码解决
打开终端 命令: sudo su 输入密码: aptitude search uming 显示: root@terwer-PC:/home/terwer# aptitude search uming ...
- debian配置java环境变量
操作如下 首先从Oracle上下载支持linux的java jdk,然后安装到你系统中, 然后到/home/xxxx/.bashrc文件中加入 # java JAVA_HOME=/xxx/xxxxx ...
- wfp(Application的运用)
1.Application中封装了wpf的一些常用的功能,如检查未经处理的异常,处理命令行参数等. 2.如何启动wpf程序: app.xaml可用于启动wpf的窗体.也可以不用这用方式.直接创建一个a ...
- [development][C] C语言标准
GUN C的标准文档: 也就是glibc https://www.gnu.org/software/libc/ http://man7.org/linux/man-pages/dir_section_ ...
- cruise-control
https://github.com/linkedin/cruise-control https://engineering.linkedin.com/blog/2017/08/open-sourci ...
- LeetCode 922 Sort Array By Parity II 解题报告
题目要求 Given an array A of non-negative integers, half of the integers in A are odd, and half of the i ...
- Javascript 面向对象编程(一):封装 作者:yuan一峰
学习Javascript,最难的地方是什么? 我觉得,Object(对象)最难.因为Javascript的Object模型很独特,和其他语言都不一样,初学者不容易掌握. 下面就是我的学习笔记,希望对大 ...
- sql生成数据库的序列号
-- ============================================= -- Author: <Author,yaoyao,Name> -- Create dat ...
- oracle查看哪些表被锁
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where a ...
- 安全需求-建模归类——By Me
漏洞与Bug并不等同,他们之间的关系基本可以描述为:大部分的Bug影响功能性,并不涉及安全性,也就不构成漏洞:大部分的漏洞来源于Bug,但并不是全部,它们之间只是有一个很大的交集.可以用如下这个图来展 ...