Ejemplo n.º 1
0
        public override void SetupDatabase()
        {
            using (var db = new StoreRepositoryImpl())
            {
				var initializer = new SetupDatabaseInitializer<StoreRepositoryImpl, Data.Migrations.Configuration>();

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

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

                switch (sampleDataLevel)
                {
                    case SampleDataLevel.Full:
                    case SampleDataLevel.Reduced:
                        initializer = new SqlStoreSampleDatabaseInitializer(_container.Resolve<ISettingsManager>());
                        break;
                    default:
                        initializer = new SetupDatabaseInitializer<StoreRepositoryImpl, Data.Migrations.Configuration>();
                        break;
                }

                initializer.InitializeDatabase(db);
            }
        }