public TestStore CreateTestStore(ITestStoreFactory testStoreFactory) { return(testStoreFactory.GetOrCreate(StoreName) .Initialize( AddServices(testStoreFactory.AddProviderServices(new ServiceCollection())) .BuildServiceProvider(validateScopes: true), CreateContext, c => { }, null)); }
public static ITestStoreFactory EnsureInitialized( ref ITestStoreFactory inst, InfoCarrierBackendTestStoreFactory backendTestStoreFactory, Type contextType, Action <ModelBuilder, DbContext> onModelCreating, Func <DbContextOptionsBuilder, DbContextOptionsBuilder> onAddOptions = null, Action <DbContext, DbContext> copyDbContextParameters = null) => NonCapturingLazyInitializer.EnsureInitialized( ref inst, inst, _ => new InfoCarrierTestStoreFactory( new SharedTestStoreProperties { ContextType = contextType, OnModelCreating = onModelCreating, OnAddOptions = onAddOptions ?? (o => o), CopyDbContextParameters = copyDbContextParameters, }, backendTestStoreFactory));
public TestStore CreateTestStore(ITestStoreFactory testStoreFactory, string storeName, Action <CrossStoreContext> seed = null) => testStoreFactory.GetOrCreate(storeName) .Initialize( AddServices(testStoreFactory.AddProviderServices(new ServiceCollection())).BuildServiceProvider(validateScopes: true), CreateContext, seed);