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.
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.