using System.Data.Entity; using System.Data.Entity.Infrastructure; using CodeFirstPowerTools.Models.Mapping; namespace CodeFirstPowerTools.Models { public partial class NorthwindContext : DbContext { static NorthwindContext() { Database.SetInitializer( null ); } public NorthwindContext() : base ( "Name=NorthwindContext" ) { } public DbSet Categories { get ; set ; } public DbSet CustomerDemographics { get ; set ; } public DbSet Customers { get ; set ; } public DbSet Employees { get ; set ; } public DbSet Order_Details { get ; set ; } public DbSet Orders { get ; set ; } public DbSet Products { get ; set ; } public DbSet Regions { get ; set ; } public DbSet Shippers { get ; set ; } public DbSet Suppliers { get ; set ; } public DbSet Territories { get ; set ; } public DbSet Alphabetical_list_of_products { get ; set ; } public DbSet Category_Sales_for_1997 { get ; set ; } public DbSet Current_Product_Lists { get ; set ; } public DbSet Customer_and_Suppliers_by_Cities { get ; set ; } public DbSet Invoices { get ; set ; } public DbSet Order_Details_Extendeds { get ; set ; } public DbSet Order_Subtotals { get ; set ; } public DbSet Orders_Qries { get ; set ; } public DbSet Product_Sales_for_1997 { get ; set ; } public DbSet Products_Above_Average_Prices { get ; set ; } public DbSet Products_by_Categories { get ; set ; } public DbSet Sales_by_Categories { get ; set ; } public DbSet Sales_Totals_by_Amounts { get ; set ; } public DbSet Summary_of_Sales_by_Quarters { get ; set ; } public DbSet Summary_of_Sales_by_Years { get ; set ; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Configurations.Add( new CategoryMap()); modelBuilder.Configurations.Add( new CustomerDemographicMap()); modelBuilder.Configurations.Add( new CustomerMap()); modelBuilder.Configurations.Add( new EmployeeMap()); modelBuilder.Configurations.Add( new Order_DetailMap()); modelBuilder.Configurations.Add( new OrderMap()); modelBuilder.Configurations.Add( new ProductMap()); modelBuilder.Configurations.Add( new RegionMap()); modelBuilder.Configurations.Add( new ShipperMap()); modelBuilder.Configurations.Add( new SupplierMap()); modelBuilder.Configurations.Add( new TerritoryMap()); modelBuilder.Configurations.Add( new Alphabetical_list_of_productMap()); modelBuilder.Configurations.Add( new Category_Sales_for_1997Map()); modelBuilder.Configurations.Add( new Current_Product_ListMap()); modelBuilder.Configurations.Add( new Customer_and_Suppliers_by_CityMap()); modelBuilder.Configurations.Add( new InvoiceMap()); modelBuilder.Configurations.Add( new Order_Details_ExtendedMap()); modelBuilder.Configurations.Add( new Order_SubtotalMap()); modelBuilder.Configurations.Add( new Orders_QryMap()); modelBuilder.Configurations.Add( new Product_Sales_for_1997Map()); modelBuilder.Configurations.Add( new Products_Above_Average_PriceMap()); modelBuilder.Configurations.Add( new Products_by_CategoryMap()); modelBuilder.Configurations.Add( new Sales_by_CategoryMap()); modelBuilder.Configurations.Add( new Sales_Totals_by_AmountMap()); modelBuilder.Configurations.Add( new Summary_of_Sales_by_QuarterMap()); modelBuilder.Configurations.Add( new Summary_of_Sales_by_YearMap()); } } } |