public IEfCoreTestContextWriteable GetDbContextWriteable() { var context = new EfCoreTestContext(); context.ChangeTracker.LazyLoadingEnabled = false; return(new EfCoreTestContextModel(context) as IEfCoreTestContextWriteable); }
public IEfCoreTestContextReadonly GetDbContextReadonly() { var context = new EfCoreTestContext(); context.ChangeTracker.AutoDetectChangesEnabled = false; context.ChangeTracker.LazyLoadingEnabled = false; context.ChangeTracker.QueryTrackingBehavior = Microsoft.EntityFrameworkCore.QueryTrackingBehavior.NoTracking; return(new EfCoreTestContextModel(context) as IEfCoreTestContextReadonly); }
public EfCoreTestContextModel(EfCoreTestContext efCoreTestContext) : base(efCoreTestContext) { _efCoreTestContext = efCoreTestContext; }