V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
male110
V2EX  ›  .NET

Ef mysql 多线程

  •  
  •   male110 · 2018-04-04 16:57:18 +08:00 · 2905 次点击
    这是一个创建于 2185 天前的主题,其中的信息可能已经有所发展或是发生改变。

    MySqlException: There is already an open DataReader associated with this Connection which must be closed first.

    Parallel.ForEach 然后报了上面的错误,怎么处理

    3 条回复    2018-04-05 09:55:08 +08:00
    male110
        1
    male110  
    OP
       2018-04-04 17:34:32 +08:00
    System.Data.Entity.Core.EntityException:“基础提供程序在 EnlistTransaction 上失败。”
    内部异常
    InvalidOperationException: Nested transactions are not supported.
    Presbyter
        2
    Presbyter  
       2018-04-04 22:40:16 +08:00
    beginor
        3
    beginor  
       2018-04-05 09:55:08 +08:00 via Android
    一个 connection 通常只能有一个 reader 在用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1051 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:15 · PVG 03:15 · LAX 12:15 · JFK 15:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.