//---------------------------------------------------------------------------------------------
// This file was AUTO-GENERATED by "EF Domain Objects" Xomega.Net generator.
//
// Manual CHANGES to this file WILL BE LOST when the code is regenerated.
//---------------------------------------------------------------------------------------------
using Microsoft.EntityFrameworkCore;

namespace AdventureWorks.Services.Entities
{
    public partial class AdventureWorksEntities : DbContext
    {
        public AdventureWorksEntities(DbContextOptions options) : base(options)
        {
        }

        #region Entities

        ///<summary>
        /// Street address information for customers, employees, and vendors.
        ///</summary>
        public virtual DbSet<Address> Address { get; set; }

        ///<summary>
        /// Types of addresses stored in the Address table. 
        ///</summary>
        public virtual DbSet<AddressType> AddressType { get; set; }

        ///<summary>
        /// Current version number of the AdventureWorks 2014 sample database. 
        ///</summary>
        public virtual DbSet<AwBuildVersion> AwBuildVersion { get; set; }

        ///<summary>
        /// Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
        ///</summary>
        public virtual DbSet<BillOfMaterials> BillOfMaterials { get; set; }

        ///<summary>
        /// Source of the ID that connects vendors, customers, and employees with address and contact information.
        ///</summary>
        public virtual DbSet<BusinessEntity> BusinessEntity { get; set; }

        ///<summary>
        /// Cross-reference table mapping customers, vendors, and employees to their addresses.
        ///</summary>
        public virtual DbSet<BusinessEntityAddress> BusinessEntityAddress { get; set; }

        ///<summary>
        /// Cross-reference table mapping stores, vendors, and employees to people
        ///</summary>
        public virtual DbSet<BusinessEntityContact> BusinessEntityContact { get; set; }

        ///<summary>
        /// Lookup table containing the types of business entity contacts.
        ///</summary>
        public virtual DbSet<ContactType> ContactType { get; set; }

        ///<summary>
        /// Lookup table containing the ISO standard codes for countries and regions.
        ///</summary>
        public virtual DbSet<CountryRegion> CountryRegion { get; set; }

        ///<summary>
        /// Cross-reference table mapping ISO currency codes to a country or region.
        ///</summary>
        public virtual DbSet<CountryRegionCurrency> CountryRegionCurrency { get; set; }

        ///<summary>
        /// Customer credit card information.
        ///</summary>
        public virtual DbSet<CreditCard> CreditCard { get; set; }

        ///<summary>
        /// Lookup table containing the languages in which some AdventureWorks data is stored.
        ///</summary>
        public virtual DbSet<Culture> Culture { get; set; }

        ///<summary>
        /// Lookup table containing standard ISO currencies.
        ///</summary>
        public virtual DbSet<Currency> Currency { get; set; }

        ///<summary>
        /// Currency exchange rates.
        ///</summary>
        public virtual DbSet<CurrencyRate> CurrencyRate { get; set; }

        ///<summary>
        /// Current customer information. Also see the Person and Store tables.
        ///</summary>
        public virtual DbSet<Customer> Customer { get; set; }

        ///<summary>
        /// Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.
        ///</summary>
        public virtual DbSet<DatabaseLog> DatabaseLog { get; set; }

        ///<summary>
        /// Lookup table containing the departments within the Adventure Works Cycles company.
        ///</summary>
        public virtual DbSet<Department> Department { get; set; }

        ///<summary>
        /// Where to send a person email.
        ///</summary>
        public virtual DbSet<EmailAddress> EmailAddress { get; set; }

        ///<summary>
        /// Employee information such as salary, department, and title.
        ///</summary>
        public virtual DbSet<Employee> Employee { get; set; }

        ///<summary>
        /// Employee department transfers.
        ///</summary>
        public virtual DbSet<EmployeeDepartmentHistory> EmployeeDepartmentHistory { get; set; }

        ///<summary>
        /// Employee pay history.
        ///</summary>
        public virtual DbSet<EmployeePayHistory> EmployeePayHistory { get; set; }

        ///<summary>
        /// Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct.
        ///</summary>
        public virtual DbSet<ErrorLog> ErrorLog { get; set; }

        ///<summary>
        /// Bicycle assembly diagrams.
        ///</summary>
        public virtual DbSet<Illustration> Illustration { get; set; }

        ///<summary>
        /// Résumés submitted to Human Resources by job applicants.
        ///</summary>
        public virtual DbSet<JobCandidate> JobCandidate { get; set; }

        ///<summary>
        /// Product inventory and manufacturing locations.
        ///</summary>
        public virtual DbSet<Location> Location { get; set; }

        ///<summary>
        /// Individual tracking events associated with a specific sales order.
        ///</summary>
        public virtual DbSet<OrderTracking> OrderTracking { get; set; }

        ///<summary>
        /// One way hashed authentication information
        ///</summary>
        public virtual DbSet<Password> Password { get; set; }

        ///<summary>
        /// Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.
        ///</summary>
        public virtual DbSet<Person> Person { get; set; }

        ///<summary>
        /// Cross-reference table mapping people to their credit card information in the CreditCard table. 
        ///</summary>
        public virtual DbSet<PersonCreditCard> PersonCreditCard { get; set; }

        ///<summary>
        /// Telephone number and type of a person.
        ///</summary>
        public virtual DbSet<PersonPhone> PersonPhone { get; set; }

        ///<summary>
        /// Type of phone number of a person.
        ///</summary>
        public virtual DbSet<PhoneNumberType> PhoneNumberType { get; set; }

        ///<summary>
        /// Products sold or used in the manfacturing of sold products.
        ///</summary>
        public virtual DbSet<Product> Product { get; set; }

        ///<summary>
        /// High-level product categorization.
        ///</summary>
        public virtual DbSet<ProductCategory> ProductCategory { get; set; }

        ///<summary>
        /// Changes in the cost of a product over time.
        ///</summary>
        public virtual DbSet<ProductCostHistory> ProductCostHistory { get; set; }

        ///<summary>
        /// Product descriptions in several languages.
        ///</summary>
        public virtual DbSet<ProductDescription> ProductDescription { get; set; }

        ///<summary>
        /// Product inventory information.
        ///</summary>
        public virtual DbSet<ProductInventory> ProductInventory { get; set; }

        ///<summary>
        /// Changes in the list price of a product over time.
        ///</summary>
        public virtual DbSet<ProductListPriceHistory> ProductListPriceHistory { get; set; }

        ///<summary>
        /// Product model classification.
        ///</summary>
        public virtual DbSet<ProductModel> ProductModel { get; set; }

        ///<summary>
        /// Cross-reference table mapping product models and illustrations.
        ///</summary>
        public virtual DbSet<ProductModelIllustration> ProductModelIllustration { get; set; }

        ///<summary>
        /// Cross-reference table mapping product descriptions and the language the description is written in.
        ///</summary>
        public virtual DbSet<ProductModelProductDescriptionCulture> ProductModelProductDescriptionCulture { get; set; }

        ///<summary>
        /// Product images.
        ///</summary>
        public virtual DbSet<ProductPhoto> ProductPhoto { get; set; }

        ///<summary>
        /// Cross-reference table mapping products and product photos.
        ///</summary>
        public virtual DbSet<ProductProductPhoto> ProductProductPhoto { get; set; }

        ///<summary>
        /// Customer reviews of products they have purchased.
        ///</summary>
        public virtual DbSet<ProductReview> ProductReview { get; set; }

        ///<summary>
        /// Product subcategories. See ProductCategory table.
        ///</summary>
        public virtual DbSet<ProductSubcategory> ProductSubcategory { get; set; }

        ///<summary>
        /// Cross-reference table mapping vendors with the products they supply.
        ///</summary>
        public virtual DbSet<ProductVendor> ProductVendor { get; set; }

        ///<summary>
        /// Individual products associated with a specific purchase order. See PurchaseOrderHeader.
        ///</summary>
        public virtual DbSet<PurchaseOrderDetail> PurchaseOrderDetail { get; set; }

        ///<summary>
        /// General purchase order information. See PurchaseOrderDetail.
        ///</summary>
        public virtual DbSet<PurchaseOrderHeader> PurchaseOrderHeader { get; set; }

        ///<summary>
        /// General sales order information.
        ///</summary>
        public virtual DbSet<SalesOrder> SalesOrder { get; set; }

        ///<summary>
        /// Individual products associated with a specific sales order. See SalesOrderHeader.
        ///</summary>
        public virtual DbSet<SalesOrderDetail> SalesOrderDetail { get; set; }

        public virtual DbSet<SalesOrderJson> SalesOrderJson { get; set; }

        ///<summary>
        /// Cross-reference table mapping sales orders to sales reason codes.
        ///</summary>
        public virtual DbSet<SalesOrderReason> SalesOrderReason { get; set; }

        ///<summary>
        /// Sales representative current information.
        ///</summary>
        public virtual DbSet<SalesPerson> SalesPerson { get; set; }

        ///<summary>
        /// Sales performance tracking.
        ///</summary>
        public virtual DbSet<SalesPersonQuotaHistory> SalesPersonQuotaHistory { get; set; }

        ///<summary>
        /// Lookup table of customer purchase reasons.
        ///</summary>
        public virtual DbSet<SalesReason> SalesReason { get; set; }

        ///<summary>
        /// Tax rate lookup table.
        ///</summary>
        public virtual DbSet<SalesTaxRate> SalesTaxRate { get; set; }

        ///<summary>
        /// Sales territory lookup table.
        ///</summary>
        public virtual DbSet<SalesTerritory> SalesTerritory { get; set; }

        ///<summary>
        /// Sales representative transfers to other sales territories.
        ///</summary>
        public virtual DbSet<SalesTerritoryHistory> SalesTerritoryHistory { get; set; }

        ///<summary>
        /// Manufacturing failure reasons lookup table.
        ///</summary>
        public virtual DbSet<ScrapReason> ScrapReason { get; set; }

        ///<summary>
        /// Work shift lookup table.
        ///</summary>
        public virtual DbSet<Shift> Shift { get; set; }

        ///<summary>
        /// Shipping company lookup table.
        ///</summary>
        public virtual DbSet<ShipMethod> ShipMethod { get; set; }

        ///<summary>
        /// Contains online customer orders until the order is submitted or cancelled.
        ///</summary>
        public virtual DbSet<ShoppingCartItem> ShoppingCartItem { get; set; }

        ///<summary>
        /// Sale discounts lookup table.
        ///</summary>
        public virtual DbSet<SpecialOffer> SpecialOffer { get; set; }

        ///<summary>
        /// Cross-reference table mapping products to special offer discounts.
        ///</summary>
        public virtual DbSet<SpecialOfferProduct> SpecialOfferProduct { get; set; }

        ///<summary>
        /// State and province lookup table.
        ///</summary>
        public virtual DbSet<StateProvince> StateProvince { get; set; }

        ///<summary>
        /// Customers (resellers) of Adventure Works products.
        ///</summary>
        public virtual DbSet<Store> Store { get; set; }

        ///<summary>
        /// Tracking event lookup table.
        ///</summary>
        public virtual DbSet<TrackingEvent> TrackingEvent { get; set; }

        ///<summary>
        /// Record of each purchase order, sales order, or work order transaction year to date.
        ///</summary>
        public virtual DbSet<TransactionHistory> TransactionHistory { get; set; }

        ///<summary>
        /// Transactions for previous years.
        ///</summary>
        public virtual DbSet<TransactionHistoryArchive> TransactionHistoryArchive { get; set; }

        ///<summary>
        /// Unit of measure lookup table.
        ///</summary>
        public virtual DbSet<UnitMeasure> UnitMeasure { get; set; }

        ///<summary>
        /// Companies from whom Adventure Works Cycles purchases parts or other goods.
        ///</summary>
        public virtual DbSet<Vendor> Vendor { get; set; }

        ///<summary>
        /// Manufacturing work orders.
        ///</summary>
        public virtual DbSet<WorkOrder> WorkOrder { get; set; }

        ///<summary>
        /// Work order details.
        ///</summary>
        public virtual DbSet<WorkOrderRouting> WorkOrderRouting { get; set; }

        #endregion

        #region Configurations

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new AddressConfig());
            modelBuilder.ApplyConfiguration(new AddressTypeConfig());
            modelBuilder.ApplyConfiguration(new AwBuildVersionConfig());
            modelBuilder.ApplyConfiguration(new BillOfMaterialsConfig());
            modelBuilder.ApplyConfiguration(new BusinessEntityConfig());
            modelBuilder.ApplyConfiguration(new BusinessEntityAddressConfig());
            modelBuilder.ApplyConfiguration(new BusinessEntityContactConfig());
            modelBuilder.ApplyConfiguration(new ContactTypeConfig());
            modelBuilder.ApplyConfiguration(new CountryRegionConfig());
            modelBuilder.ApplyConfiguration(new CountryRegionCurrencyConfig());
            modelBuilder.ApplyConfiguration(new CreditCardConfig());
            modelBuilder.ApplyConfiguration(new CultureConfig());
            modelBuilder.ApplyConfiguration(new CurrencyConfig());
            modelBuilder.ApplyConfiguration(new CurrencyRateConfig());
            modelBuilder.ApplyConfiguration(new CustomerConfig());
            modelBuilder.ApplyConfiguration(new DatabaseLogConfig());
            modelBuilder.ApplyConfiguration(new DepartmentConfig());
            modelBuilder.ApplyConfiguration(new EmailAddressConfig());
            modelBuilder.ApplyConfiguration(new EmployeeConfig());
            modelBuilder.ApplyConfiguration(new EmployeeDepartmentHistoryConfig());
            modelBuilder.ApplyConfiguration(new EmployeePayHistoryConfig());
            modelBuilder.ApplyConfiguration(new ErrorLogConfig());
            modelBuilder.ApplyConfiguration(new IllustrationConfig());
            modelBuilder.ApplyConfiguration(new JobCandidateConfig());
            modelBuilder.ApplyConfiguration(new LocationConfig());
            modelBuilder.ApplyConfiguration(new OrderTrackingConfig());
            modelBuilder.ApplyConfiguration(new PasswordConfig());
            modelBuilder.ApplyConfiguration(new PersonConfig());
            modelBuilder.ApplyConfiguration(new PersonCreditCardConfig());
            modelBuilder.ApplyConfiguration(new PersonPhoneConfig());
            modelBuilder.ApplyConfiguration(new PhoneNumberTypeConfig());
            modelBuilder.ApplyConfiguration(new ProductConfig());
            modelBuilder.ApplyConfiguration(new ProductCategoryConfig());
            modelBuilder.ApplyConfiguration(new ProductCostHistoryConfig());
            modelBuilder.ApplyConfiguration(new ProductDescriptionConfig());
            modelBuilder.ApplyConfiguration(new ProductInventoryConfig());
            modelBuilder.ApplyConfiguration(new ProductListPriceHistoryConfig());
            modelBuilder.ApplyConfiguration(new ProductModelConfig());
            modelBuilder.ApplyConfiguration(new ProductModelIllustrationConfig());
            modelBuilder.ApplyConfiguration(new ProductModelProductDescriptionCultureConfig());
            modelBuilder.ApplyConfiguration(new ProductPhotoConfig());
            modelBuilder.ApplyConfiguration(new ProductProductPhotoConfig());
            modelBuilder.ApplyConfiguration(new ProductReviewConfig());
            modelBuilder.ApplyConfiguration(new ProductSubcategoryConfig());
            modelBuilder.ApplyConfiguration(new ProductVendorConfig());
            modelBuilder.ApplyConfiguration(new PurchaseOrderDetailConfig());
            modelBuilder.ApplyConfiguration(new PurchaseOrderHeaderConfig());
            modelBuilder.ApplyConfiguration(new SalesOrderConfig());
            modelBuilder.ApplyConfiguration(new SalesOrderDetailConfig());
            modelBuilder.ApplyConfiguration(new SalesOrderJsonConfig());
            modelBuilder.ApplyConfiguration(new SalesOrderReasonConfig());
            modelBuilder.ApplyConfiguration(new SalesPersonConfig());
            modelBuilder.ApplyConfiguration(new SalesPersonQuotaHistoryConfig());
            modelBuilder.ApplyConfiguration(new SalesReasonConfig());
            modelBuilder.ApplyConfiguration(new SalesTaxRateConfig());
            modelBuilder.ApplyConfiguration(new SalesTerritoryConfig());
            modelBuilder.ApplyConfiguration(new SalesTerritoryHistoryConfig());
            modelBuilder.ApplyConfiguration(new ScrapReasonConfig());
            modelBuilder.ApplyConfiguration(new ShiftConfig());
            modelBuilder.ApplyConfiguration(new ShipMethodConfig());
            modelBuilder.ApplyConfiguration(new ShoppingCartItemConfig());
            modelBuilder.ApplyConfiguration(new SpecialOfferConfig());
            modelBuilder.ApplyConfiguration(new SpecialOfferProductConfig());
            modelBuilder.ApplyConfiguration(new StateProvinceConfig());
            modelBuilder.ApplyConfiguration(new StoreConfig());
            modelBuilder.ApplyConfiguration(new TrackingEventConfig());
            modelBuilder.ApplyConfiguration(new TransactionHistoryConfig());
            modelBuilder.ApplyConfiguration(new TransactionHistoryArchiveConfig());
            modelBuilder.ApplyConfiguration(new UnitMeasureConfig());
            modelBuilder.ApplyConfiguration(new VendorConfig());
            modelBuilder.ApplyConfiguration(new WorkOrderConfig());
            modelBuilder.ApplyConfiguration(new WorkOrderRoutingConfig());
        }

        #endregion
    }
}