Closed voodookoop closed 7 years ago
@darxis : maybe you also figured out, that this basically has nothing to do with many to many, just simply creating another lazied dbContext, then querying a lazied prop will bring up the ObjectDisposedException.
@voodookoop Thanks for reporting an issue!
I figured out that EF Core is caching Expressions for materializing entities. In LazyLoading, such expression contains the DBContext. So the problem is that when you create another DBContext, the old materializing expressions are cahced, and they contain the old (Disposed) DBContext. I'm gonna try to fix it until the end of the day.
Closing as it is fixed in release 1.1.1-beta2, now available on NuGet.
Also note that in the new release you need to add two more lines of code to your configuration (they are present in the sample project and in the README.md)
Hi, Consider the following case:
you can reproduce the exception based on this.