public void Run(IBasicPersistenceProvider provider)
		{
			if (this.IsFirstRun)
			{
				OnBeforeRun(provider);
			}
			else
			{
				provider.DeleteAll<Category>();
				provider.DeleteAll<Customer>();
				provider.DeleteAll<Employee>();
				provider.DeleteAll<Shipper>();
				provider.DeleteAll<Order>();
				provider.DeleteAll<OrderDetail>();
				provider.DeleteAll<CustomerCustomerDemo>();
				provider.DeleteAll<Region>();
				provider.DeleteAll<Territory>();
				provider.DeleteAll<EmployeeTerritory>();
			}

			provider.StoreAll(NorthwindData.Categories);
			provider.StoreAll(NorthwindData.Customers);
			provider.StoreAll(NorthwindData.Employees);
			provider.StoreAll(NorthwindData.Shippers);
			provider.StoreAll(NorthwindData.Orders);
			provider.StoreAll(NorthwindData.OrderDetails);
			provider.StoreAll(NorthwindData.CustomerCustomerDemos);
			provider.StoreAll(NorthwindData.Regions);
			provider.StoreAll(NorthwindData.Territories);
			provider.StoreAll(NorthwindData.EmployeeTerritories);
		}
        public void Run(IBasicPersistenceProvider provider)
        {
            if (this.IsFirstRun)
            {
                OnBeforeRun(provider);
            }
            else
            {
                provider.DeleteAll <Category>();
                provider.DeleteAll <Customer>();
                provider.DeleteAll <Employee>();
                provider.DeleteAll <Shipper>();
                provider.DeleteAll <Order>();
                provider.DeleteAll <OrderDetail>();
                provider.DeleteAll <CustomerCustomerDemo>();
                provider.DeleteAll <Region>();
                provider.DeleteAll <Territory>();
                provider.DeleteAll <EmployeeTerritory>();
            }

            provider.StoreAll(NorthwindData.Categories);
            provider.StoreAll(NorthwindData.Customers);
            provider.StoreAll(NorthwindData.Employees);
            provider.StoreAll(NorthwindData.Shippers);
            provider.StoreAll(NorthwindData.Orders);
            provider.StoreAll(NorthwindData.OrderDetails);
            provider.StoreAll(NorthwindData.CustomerCustomerDemos);
            provider.StoreAll(NorthwindData.Regions);
            provider.StoreAll(NorthwindData.Territories);
            provider.StoreAll(NorthwindData.EmployeeTerritories);
        }
Exemple #3
0
 /// <summary>Loads northwind data.</summary>
 /// <param name="persistenceProvider">The persistence provider.</param>
 private static void LoadNorthwindData(IBasicPersistenceProvider persistenceProvider)
 {
     persistenceProvider.StoreAll(NorthwindData.Categories);
     persistenceProvider.StoreAll(NorthwindData.Customers);
     persistenceProvider.StoreAll(NorthwindData.Employees);
     persistenceProvider.StoreAll(NorthwindData.Shippers);
     persistenceProvider.StoreAll(NorthwindData.Suppliers);
     persistenceProvider.StoreAll(NorthwindData.Orders);
     persistenceProvider.StoreAll(NorthwindData.Products);
     persistenceProvider.StoreAll(NorthwindData.OrderDetails);
     persistenceProvider.StoreAll(NorthwindData.CustomerCustomerDemos);
     persistenceProvider.StoreAll(NorthwindData.Regions);
     persistenceProvider.StoreAll(NorthwindData.Territories);
     persistenceProvider.StoreAll(NorthwindData.EmployeeTerritories);
 }
        /// <summary>Loads northwind data.</summary>
        /// <param name="persistenceProvider">The persistence provider.</param>
		private static void LoadNorthwindData(IBasicPersistenceProvider persistenceProvider)
		{
			persistenceProvider.StoreAll(NorthwindData.Categories);
			persistenceProvider.StoreAll(NorthwindData.Customers);
			persistenceProvider.StoreAll(NorthwindData.Employees);
			persistenceProvider.StoreAll(NorthwindData.Shippers);
			persistenceProvider.StoreAll(NorthwindData.Orders);
			persistenceProvider.StoreAll(NorthwindData.Suppliers);
			persistenceProvider.StoreAll(NorthwindData.Products);
			persistenceProvider.StoreAll(NorthwindData.OrderDetails);
			persistenceProvider.StoreAll(NorthwindData.CustomerCustomerDemos);
			persistenceProvider.StoreAll(NorthwindData.Regions);
			persistenceProvider.StoreAll(NorthwindData.Territories);
			persistenceProvider.StoreAll(NorthwindData.EmployeeTerritories);
		}