darxis / EntityFramework.LazyLoading

LazyLoading for EF Core
MIT License
21 stars 4 forks source link

LazyLoadingEntityMaterializerSource by default is registered as Singleton #10

Closed darxis closed 7 years ago

darxis commented 7 years ago

LazyLoadingEntityMaterializerSource by default (by EntityFramework) is registered as Singleton. LazyLoadingEntityMaterializerSource is DbContext-scoped so it can't be a Singleton.

Bug reproduction

Create and use two LazyLoading-enabled DbContexts at the same time. Entity references/collections from both DbContexts will get queried within the second DbContext.