public override InMemoryTestStore CreateTestStore() => InMemoryTestStore.CreateScratch(() => { using (var context = CreateContext(null)) { Seed(context); } }, _serviceProvider);
public override InMemoryTestStore CreateTestStore() => InMemoryTestStore.CreateScratch( _serviceProvider, nameof(GraphUpdatesInMemoryFixture), () => { using (var context = CreateContext(null)) { Seed(context); } });
public override InMemoryTestStore CreateTestStore() { return InMemoryTestStore.CreateScratch(() => { using (var context = new FindContext(_options)) { Seed(context); } }, _serviceProvider); }
public override InMemoryTestStore CreateTestStore() => InMemoryTestStore.CreateScratch( _serviceProvider, nameof(FindInMemoryFixture), () => { using (var context = new FindContext(_options)) { Seed(context); } });
private static InMemoryTestStore CreateScratch <TContext>(Action <TContext> Seed) where TContext : DbContext, new() => InMemoryTestStore.CreateScratch( () => { using (var context = new TContext()) { Seed(context); } }, () => { using (var context = new Context3595()) { context.GetInfrastructure().GetRequiredService <IInMemoryStoreSource>().GetGlobalStore().Clear(); } });
private static InMemoryTestStore CreateScratch <TContext>(Action <TContext> Seed) where TContext : DbContext, new() => InMemoryTestStore.CreateScratch( () => { using (var context = new TContext()) { Seed(context); } }, () => { using (var context = new Context3595()) { context.GetService <IInMemoryStoreSource>().GetPersistentStore(DatabaseName).Clear(); } });