public override void SetupDatabase(SampleDataLevel sampleDataLevel) { base.SetupDatabase(sampleDataLevel); using (var db = new CatalogRepositoryImpl(_connectionStringName)) { IDatabaseInitializer <CatalogRepositoryImpl> initializer; switch (sampleDataLevel) { case SampleDataLevel.Full: initializer = new SqlCatalogSampleDatabaseInitializer(); break; case SampleDataLevel.Reduced: initializer = new SqlCatalogReducedSampleDatabaseInitializer(); break; default: initializer = new SetupDatabaseInitializer <CatalogRepositoryImpl, Data.Migrations.Configuration>(); break; } initializer.InitializeDatabase(db); } }
public override void SetupDatabase(SampleDataLevel sampleDataLevel) { base.SetupDatabase(sampleDataLevel); using (var db = new CatalogRepositoryImpl(_connectionStringName)) { IDatabaseInitializer<CatalogRepositoryImpl> initializer; switch (sampleDataLevel) { case SampleDataLevel.Full: initializer = new SqlCatalogSampleDatabaseInitializer(); break; case SampleDataLevel.Reduced: initializer = new SqlCatalogReducedSampleDatabaseInitializer(); break; default: initializer = new SetupDatabaseInitializer<CatalogRepositoryImpl, Data.Migrations.Configuration>(); break; } initializer.InitializeDatabase(db); } }