File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ public class MyDbContextFactory : IDbContextFactory<MyDbContext>
2525 // LazyLoading specific
2626 if (_isLazy )
2727 {
28- dbContextOptionsBuilder .ReplaceService <Microsoft .EntityFrameworkCore .Metadata .Internal .IEntityMaterializerSource , Microsoft .EntityFrameworkCore .LazyLoading .Internal .LazyLoadingEntityMaterializerSource <MyDbContext >>();
28+ dbContextOptionsBuilder .ReplaceService <Microsoft .EntityFrameworkCore .Metadata .Internal .IEntityMaterializerSource , Microsoft .EntityFrameworkCore .LazyLoading .Metadata . Internal .LazyLoadingEntityMaterializerSource <MyDbContext >>();
2929 dbContextOptionsBuilder .ReplaceService <Microsoft .EntityFrameworkCore .Internal .IConcurrencyDetector , Microsoft .EntityFrameworkCore .LazyLoading .Internal .ConcurrencyDetector >();
30+ dbContextOptionsBuilder .ReplaceService <Microsoft .EntityFrameworkCore .Query .Internal .ICompiledQueryCache , Microsoft .EntityFrameworkCore .LazyLoading .Query .Internal .PerDbContextCompiledQueryCache >();
3031 }
3132
3233
@@ -36,7 +37,8 @@ public class MyDbContextFactory : IDbContextFactory<MyDbContext>
3637 // LazyLoading specific
3738 if (_isLazy )
3839 {
39- (ctx .GetService <Microsoft .EntityFrameworkCore .Metadata .Internal .IEntityMaterializerSource >() as Microsoft .EntityFrameworkCore .LazyLoading .Internal .LazyLoadingEntityMaterializerSource <MyDbContext >).SetDbContext (ctx );
40+ (ctx .GetService <Microsoft .EntityFrameworkCore .Metadata .Internal .IEntityMaterializerSource >() as Microsoft .EntityFrameworkCore .LazyLoading .Metadata .Internal .LazyLoadingEntityMaterializerSource <MyDbContext >).SetDbContext (ctx );
41+ (ctx .GetService <Microsoft .EntityFrameworkCore .Query .Internal .ICompiledQueryCache >() as Microsoft .EntityFrameworkCore .LazyLoading .Query .Internal .PerDbContextCompiledQueryCache ).SetDbContext (ctx );
4042 }
4143
4244 return ctx ;
You can’t perform that action at this time.
0 commit comments