JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
566 stars 117 forks source link

Adds unit tests showing issues with DbContext scoping for ASP.NET Core 3 #209

Closed jsheetzati closed 4 years ago

jsheetzati commented 4 years ago

Added two unit tests that demonstrate the scoping issue described in https://github.com/JasperFx/lamar/issues/198. The Microsoft example passes whereas the Lamar one fails with DbContext threading exceptions

CodingGorilla commented 4 years ago

@jsheetzati Am I missing something, all these tests pass?

jsheetzati commented 4 years ago

Hmm not sure. This definitely fails for me..

image

CodingGorilla commented 4 years ago

Ok, it doesn't failed consistently, I had to try it a few times to get it to fail. :)

jeremydmiller commented 4 years ago

I'm going to pull this in soon, but I'm hopeful that the fix for #215 actually knocks this one out too