public TestDatabaseManager() { EnvConfig = new EnvConfig(); var dbCfg = new DatabaseConfig(EnvConfig); DbContextProvider = new DbContextProvider(dbCfg); CreateTableScriptsProvider = new CreateTableScriptsProvider(); DatabaseDirectoryManager = new DatabaseDirectoryManager(dbCfg); CreateDatabase = new CreateDatabase(dbCfg, DatabaseDirectoryManager, CreateTableScriptsProvider.GetScripts()); DropDatabase = new DropDatabase(dbCfg); }
Context ITestDatabaseManager.CreateDbContext() => DbContextProvider.CreateDbContext();
private void SeedCustomersTable() { using (var dbCtx = DbContextProvider.CreateDbContext()) PeopleSeeder.Seed(dbCtx); }