您的位置:首页 > 运维架构

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

2015-04-22 10:21 489 查看
如果确保自己的linq或者其他语句都没有写错也没有继续优化的可能时解决方法:

在数据库连接字符串中添加MARS信息为true

<connectionStrings>
<add name="CONN" connectionString="server=.;database=db;uid=u;pwd=p;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />
</connectionStrings>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ef
相关文章推荐