Ejemplo n.º 1
0
 public override void SetupDatabase()
 {
     using (var db = new CustomerRepositoryImpl(_connectionStringName, _container.Resolve<AuditableInterceptor>()))
     {
         var initializer = new SetupDatabaseInitializer<CustomerRepositoryImpl, Data.Migrations.Configuration>();
         initializer.InitializeDatabase(db);
     }
 }
Ejemplo n.º 2
0
        public override void SetupDatabase()
        {
            using (var db = new CustomerRepositoryImpl("VirtoCommerce"))
            {
				var initializer = new SetupDatabaseInitializer<CustomerRepositoryImpl, Data.Migrations.Configuration>();
                initializer.InitializeDatabase(db);
            }

        }
Ejemplo n.º 3
0
        public override void SetupDatabase(SampleDataLevel sampleDataLevel)
        {
            using (var db = new CustomerRepositoryImpl("VirtoCommerce"))
            {
                IDatabaseInitializer<CustomerRepositoryImpl> initializer;

                switch (sampleDataLevel)
                {
                    case SampleDataLevel.Full:
                    case SampleDataLevel.Reduced:
                        initializer = new SqlCustomerSampleDatabaseInitializer();
                        break;
                    default:
                        initializer = new SetupDatabaseInitializer<CustomerRepositoryImpl, VirtoCommerce.CustomerModule.Data.Migrations.Configuration>();
                        break;
                }

                initializer.InitializeDatabase(db);
            }

        }