male110
V2EX  ›  .NET

Ef mysql 多线程

  •  
  •   male110 · Apr 4, 2018 · 3576 views
    This topic created in 2970 days ago, the information mentioned may be changed or developed.

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

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

    3 replies    2018-04-05 09:55:08 +08:00
    male110
        1
    male110  
    OP
       Apr 4, 2018
    System.Data.Entity.Core.EntityException:“基础提供程序在 EnlistTransaction 上失败。”
    内部异常
    InvalidOperationException: Nested transactions are not supported.
    Presbyter
        2
    Presbyter  
       Apr 4, 2018
    beginor
        3
    beginor  
       Apr 5, 2018 via Android
    一个 connection 通常只能有一个 reader 在用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   946 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 21:47 · PVG 05:47 · LAX 14:47 · JFK 17:47
    ♥ Do have faith in what you're doing.