You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before using LINQKit, our program runs okay. After using it, I see the exception "new transaction is not allowed because there are other threads running in the session..", It looks like that AsExpandable() somehow interferes the EntityFramework's transaction management and cause EF not closing the previous transaction before starting a new one.
Note that I'm mixing the use of DbSet.AsExpandable() and EF DbSet.Where(), assuming that they're compatible with each other. Anyone notice the same issue?
The text was updated successfully, but these errors were encountered:
Turns out that I was using IQueryable and I was trying to create new transaction while iterating through the IQueryable, during which a connection is kept by EF and that will cause the error.
Before using LINQKit, our program runs okay. After using it, I see the exception "new transaction is not allowed because there are other threads running in the session..", It looks like that AsExpandable() somehow interferes the EntityFramework's transaction management and cause EF not closing the previous transaction before starting a new one.
Note that I'm mixing the use of DbSet.AsExpandable() and EF DbSet.Where(), assuming that they're compatible with each other. Anyone notice the same issue?
The text was updated successfully, but these errors were encountered: