public ApiFactory(FakeDatabaseType databaseType, Action <IServiceCollection> configureServices = null, Action <IServiceScope> onWebHostReady = null) { this.configureServices = configureServices; this.onWebHostReady = onWebHostReady; testCreationFakeContextDefinition = new FakeContextDefinition <TestCreationDbContext>(databaseType); userManagementFakeContextDefinition = new FakeContextDefinition <UserManagementDbContext>(databaseType); }
//private ServiceProvider efServiceProvider; public FakeContextDefinition(FakeDatabaseType databaseType) { this.databaseType = databaseType; var builder = new DbContextOptionsBuilder <TContext>(); SetupBuilder(builder); options = builder.Options; }