Exemplo n.º 1
0
        public override void SetupDatabase(SampleDataLevel sampleDataLevel)
        {
            var options    = _container.Resolve <IModuleInitializerOptions>();
            var modulePath = options.GetModuleDirectoryPath("VirtoCommerce.Content");
            var themePath  = Path.Combine(modulePath, "Default_Theme");

            using (var context = new DatabaseContentRepositoryImpl())
            {
                var initializer = new SqlContentDatabaseInitializer(themePath);
                initializer.InitializeDatabase(context);
            }
        }
Exemplo n.º 2
0
        public override void SetupDatabase(SampleDataLevel sampleDataLevel)
        {
            var options = _container.Resolve<IModuleInitializerOptions>();
            var modulePath = options.GetModuleDirectoryPath("VirtoCommerce.Content");
            var themePath = Path.Combine(modulePath, "Default_Theme");

            using (var context = new DatabaseContentRepositoryImpl())
            {
                var initializer = new SqlContentDatabaseInitializer(themePath, true);
                switch (sampleDataLevel)
                {
                    case SampleDataLevel.Full:
                        initializer.InitializeDatabase(context);
                        break;
                    default:
                        initializer = new SqlContentDatabaseInitializer(themePath, false);
                        initializer.InitializeDatabase(context);
                        break;
                }
            }
        }
Exemplo n.º 3
0
        public void SetupDatabase(SampleDataLevel sampleDataLevel)
        {
            var options = this._container.Resolve<IModuleInitializerOptions>();
            var modulePath = options.GetModuleDirectoryPath("VirtoCommerce.Content");
            var themePath = Path.Combine(modulePath, "Default_Theme");

			using (var context = new DatabaseContentRepositoryImpl())
            {
                var initializer = new SqlContentDatabaseInitializer(themePath);
                initializer.InitializeDatabase(context);
            }
        }