public override void SetupDatabase(SampleDataLevel sampleDataLevel)
        {
            using (var context = new CartRepositoryImpl())
            {
                var initializer = new SetupDatabaseInitializer<CartRepositoryImpl, VirtoCommerce.CartModule.Data.Migrations.Configuration>();
                initializer.InitializeDatabase(context);
            }

        }
Exemple #2
0
        public override void SetupDatabase()
        {
            using (var context = new CartRepositoryImpl(_connectionStringName, _container.Resolve<AuditableInterceptor>()))
            {
                var initializer = new SetupDatabaseInitializer<CartRepositoryImpl, VirtoCommerce.CartModule.Data.Migrations.Configuration>();
                initializer.InitializeDatabase(context);
            }

        }
		public void Tst1()
		{
			var repository = new CartRepositoryImpl("VirtoCommerce", new AuditableInterceptor(),
															   new EntityPrimaryKeyGeneratorInterceptor());
			var cart = new dataModel.ShoppingCartEntity
			{
				StoreId = "ss",
				CustomerId = "ss",
				Currency = "ss",

			};

			var shipment = new dataModel.ShipmentEntity
			{
				Currency = "sss",

			};
			cart.Shipments.Add(shipment);
			repository.Add(cart);
			repository.UnitOfWork.Commit();
		}