Click here to Skip to main content
15,885,365 members
Articles / Web Development / ASP.NET

Cascading Selection the MVC Way

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
29 Mar 2013CPOL12 min read 26K   509   25  
How to easily implement cascading selection the MVC way and leverage cached static data.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Address_StateProvinceId", "StateProvince", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.StateProvince), "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Address))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "BillOfMaterials_ComponentId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "BillOfMaterials", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.BillOfMaterials))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "BillOfMaterials_ProductAssemblyId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.Product), "BillOfMaterials", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.BillOfMaterials))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "BillOfMaterials_UnitMeasureCode", "UnitMeasure", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.UnitMeasure), "BillOfMaterials", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.BillOfMaterials))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ContactCreditCard_ContactId", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "ContactCreditCard", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ContactCreditCard))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ContactCreditCard_CreditCardId", "CreditCard", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.CreditCard), "ContactCreditCard", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ContactCreditCard))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CountryRegionCurrency_CountryRegionCode", "CountryRegion", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.CountryRegion), "CountryRegionCurrency", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CountryRegionCurrency))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CountryRegionCurrency_CurrencyCode", "Currency", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Currency), "CountryRegionCurrency", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CountryRegionCurrency))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CurrencyRate_FromCurrencyCode", "Currency", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Currency), "CurrencyRate", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CurrencyRate))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CurrencyRate_ToCurrencyCode", "Currency", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Currency), "CurrencyRate", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CurrencyRate))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CustomerAddress_AddressId", "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Address), "CustomerAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CustomerAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CustomerAddress_AddressTypeId", "AddressType", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.AddressType), "CustomerAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CustomerAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "CustomerAddress_CustomerId", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Customer), "CustomerAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.CustomerAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Customer_TerritoryId", "SalesTerritory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesTerritory), "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Customer))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeeAddress_Address", "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Address), "EmployeeAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeeAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeeAddress_Employee", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "EmployeeAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeeAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeeDepartmentHistory_DepartmentId", "Department", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Department), "EmployeeDepartmentHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeeDepartmentHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeeDepartmentHistory_Employee", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "EmployeeDepartmentHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeeDepartmentHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeeDepartmentHistory_ShiftId", "Shift", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Shift), "EmployeeDepartmentHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeeDepartmentHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "EmployeePayHistory_Employee", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "EmployeePayHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.EmployeePayHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Employee_Contact", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Employee))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Employee_Manager", "Employee1", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.Employee), "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Employee))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Individual_ContactId", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "Individual", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Individual))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Individual_CustomerId", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Customer), "Individual", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.Individual))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "JobCandidate_EmployeeId", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.Employee), "JobCandidate", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.JobCandidate))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductCostHistory_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductCostHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductCostHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductDocument_DocumentId", "Document", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Document), "ProductDocument", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductDocument))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductDocument_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductDocument", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductDocument))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductInventory_LocationId", "Location", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Location), "ProductInventory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductInventory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductInventory_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductInventory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductInventory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductListPriceHistory_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductListPriceHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductListPriceHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductModelIllustration_IllustrationId", "Illustration", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Illustration), "ProductModelIllustration", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductModelIllustration))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductModelIllustration_ProductModelId", "ProductModel", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ProductModel), "ProductModelIllustration", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductModelIllustration))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_CultureId", "Culture", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Culture), "ProductModelProductDescriptionCulture", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductModelProductDescriptionCulture))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ProductDescription), "ProductModelProductDescriptionCulture", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductModelProductDescriptionCulture))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_ProductModelId", "ProductModel", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ProductModel), "ProductModelProductDescriptionCulture", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductModelProductDescriptionCulture))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductProductPhoto_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductProductPhoto", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductProductPhoto))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductProductPhoto_ProductPhotoId", "ProductPhoto", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ProductPhoto), "ProductProductPhoto", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductProductPhoto))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductReview_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductReview", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductReview))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductSubcategory_ProductCategoryId", "ProductCategory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ProductCategory), "ProductSubcategory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductSubcategory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductVendor_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ProductVendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductVendor))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductVendor_UnitMeasureCode", "UnitMeasure", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.UnitMeasure), "ProductVendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductVendor))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ProductVendor_VendorId", "Vendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Vendor), "ProductVendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ProductVendor))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Product_ProductModelId", "ProductModel", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.ProductModel), "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Product))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Product_ProductSubcategoryId", "ProductSubcategory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.ProductSubcategory), "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Product))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Product_SizeUnitMeasureCode", "UnitMeasure", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.UnitMeasure), "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Product))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Product_WeightUnitMeasureCode", "UnitMeasure", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.UnitMeasure), "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Product))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "PurchaseOrderDetail_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "PurchaseOrderDetail", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.PurchaseOrderDetail))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.PurchaseOrderHeader), "PurchaseOrderDetail", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.PurchaseOrderDetail))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "PurchaseOrderHeader_EmployeeId", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "PurchaseOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.PurchaseOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "PurchaseOrderHeader_ShipMethodId", "ShipMethod", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ShipMethod), "PurchaseOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.PurchaseOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "PurchaseOrderHeader_VendorId", "Vendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Vendor), "PurchaseOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.PurchaseOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderDetail_SalesOrderId", "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesOrderHeader), "SalesOrderDetail", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderDetail))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SpecialOfferProduct), "SalesOrderDetail", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderDetail))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesOrderHeader), "SalesOrderHeaderSalesReason", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeaderSalesReason))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesReason), "SalesOrderHeaderSalesReason", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeaderSalesReason))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_BillToAddressId", "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Address), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_ContactId", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_CreditCardId", "CreditCard", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.CreditCard), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_CurrencyRateId", "CurrencyRate", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.CurrencyRate), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_CustomerId", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Customer), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_SalesPersonId", "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesPerson), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_ShipMethodId", "ShipMethod", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ShipMethod), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_ShipToAddressId", "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Address), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesOrderHeader_TerritoryId", "SalesTerritory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesTerritory), "SalesOrderHeader", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesOrderHeader))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesPersonQuotaHistory_SalesPerson", "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesPerson), "SalesPersonQuotaHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesPersonQuotaHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesPersonQuotaHistory_SalesPersonId", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "SalesPersonQuotaHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesPersonQuotaHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesPerson_SalesPersonId", "Employee", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Employee), "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesPerson))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesPerson_TerritoryId", "SalesTerritory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesTerritory), "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesPerson))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesTaxRate_StateProvinceId", "StateProvince", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.StateProvince), "SalesTaxRate", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesTaxRate))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesTerritoryHistory_SalesPersonId", "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesPerson), "SalesTerritoryHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesTerritoryHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SalesTerritoryHistory_TerritoryId", "SalesTerritory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesTerritory), "SalesTerritoryHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SalesTerritoryHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "ShoppingCartItem_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "ShoppingCartItem", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.ShoppingCartItem))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SpecialOfferProduct_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "SpecialOfferProduct", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SpecialOfferProduct))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "SpecialOfferProduct_SpecialOfferId", "SpecialOffer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SpecialOffer), "SpecialOfferProduct", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.SpecialOfferProduct))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "StateProvince_CountryRegionCode", "CountryRegion", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.CountryRegion), "StateProvince", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.StateProvince))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "StateProvince_TerritoryId", "SalesTerritory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.SalesTerritory), "StateProvince", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.StateProvince))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "StoreContact_ContactId", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "StoreContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.StoreContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "StoreContact_ContactTypeId", "ContactType", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ContactType), "StoreContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.StoreContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "StoreContact_CustomerId", "Store", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Store), "StoreContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.StoreContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Store_CustomerId", "Customer", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Customer), "Store", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.Store))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "Store_SalesPersonId", "SalesPerson", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.SalesPerson), "Store", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.Store))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "TransactionHistory_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "TransactionHistory", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.TransactionHistory))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorAddress_AddressId", "Address", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Address), "VendorAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorAddress_AddressTypeId", "AddressType", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.AddressType), "VendorAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorAddress_Vendor", "Vendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Vendor), "VendorAddress", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorAddress))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorContact_ContactId", "Contact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Contact), "VendorContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorContact_ContactTypeId", "ContactType", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.ContactType), "VendorContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "VendorContact_Vendor", "Vendor", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Vendor), "VendorContact", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.VendorContact))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "WorkOrderRouting_LocationId", "Location", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Location), "WorkOrderRouting", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.WorkOrderRouting))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "WorkOrderRouting_WorkOrderId", "WorkOrder", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.WorkOrder), "WorkOrderRouting", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.WorkOrderRouting))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "WorkOrder_ProductId", "Product", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(AdventureWorks.Entities.Product), "WorkOrder", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.WorkOrder))]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("AdvWorksModel", "WorkOrder_ScrapReasonId", "ScrapReason", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(AdventureWorks.Entities.ScrapReason), "WorkOrder", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(AdventureWorks.Entities.WorkOrder))]

// Original file name:
// Generation date: 4/12/2011 10:16:18 PM
namespace AdventureWorks.Entities
{
    
    /// <summary>
    /// There are no comments for AdvWorksEntities in the schema.
    /// </summary>
    public partial class AdvWorksEntities : global::System.Data.Objects.ObjectContext
    {
        /// <summary>
        /// Initializes a new AdvWorksEntities object using the connection string found in the 'AdvWorksEntities' section of the application configuration file.
        /// </summary>
        public AdvWorksEntities() : 
                base("name=AdvWorksEntities", "AdvWorksEntities")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new AdvWorksEntities object.
        /// </summary>
        public AdvWorksEntities(string connectionString) : 
                base(connectionString, "AdvWorksEntities")
        {
            this.OnContextCreated();
        }
        /// <summary>
        /// Initialize a new AdvWorksEntities object.
        /// </summary>
        public AdvWorksEntities(global::System.Data.EntityClient.EntityConnection connection) : 
                base(connection, "AdvWorksEntities")
        {
            this.OnContextCreated();
        }
        partial void OnContextCreated();
        /// <summary>
        /// There are no comments for Address in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Address> Address
        {
            get
            {
                if ((this._Address == null))
                {
                    this._Address = base.CreateQuery<Address>("[Address]");
                }
                return this._Address;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Address> _Address;
        /// <summary>
        /// There are no comments for AddressType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<AddressType> AddressType
        {
            get
            {
                if ((this._AddressType == null))
                {
                    this._AddressType = base.CreateQuery<AddressType>("[AddressType]");
                }
                return this._AddressType;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<AddressType> _AddressType;
        /// <summary>
        /// There are no comments for AwBuildVersion in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<AwBuildVersion> AwBuildVersion
        {
            get
            {
                if ((this._AwBuildVersion == null))
                {
                    this._AwBuildVersion = base.CreateQuery<AwBuildVersion>("[AwBuildVersion]");
                }
                return this._AwBuildVersion;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<AwBuildVersion> _AwBuildVersion;
        /// <summary>
        /// There are no comments for BillOfMaterials in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<BillOfMaterials> BillOfMaterials
        {
            get
            {
                if ((this._BillOfMaterials == null))
                {
                    this._BillOfMaterials = base.CreateQuery<BillOfMaterials>("[BillOfMaterials]");
                }
                return this._BillOfMaterials;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<BillOfMaterials> _BillOfMaterials;
        /// <summary>
        /// There are no comments for Contact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Contact> Contact
        {
            get
            {
                if ((this._Contact == null))
                {
                    this._Contact = base.CreateQuery<Contact>("[Contact]");
                }
                return this._Contact;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Contact> _Contact;
        /// <summary>
        /// There are no comments for ContactCreditCard in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ContactCreditCard> ContactCreditCard
        {
            get
            {
                if ((this._ContactCreditCard == null))
                {
                    this._ContactCreditCard = base.CreateQuery<ContactCreditCard>("[ContactCreditCard]");
                }
                return this._ContactCreditCard;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ContactCreditCard> _ContactCreditCard;
        /// <summary>
        /// There are no comments for ContactType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ContactType> ContactType
        {
            get
            {
                if ((this._ContactType == null))
                {
                    this._ContactType = base.CreateQuery<ContactType>("[ContactType]");
                }
                return this._ContactType;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ContactType> _ContactType;
        /// <summary>
        /// There are no comments for CountryRegion in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<CountryRegion> CountryRegion
        {
            get
            {
                if ((this._CountryRegion == null))
                {
                    this._CountryRegion = base.CreateQuery<CountryRegion>("[CountryRegion]");
                }
                return this._CountryRegion;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<CountryRegion> _CountryRegion;
        /// <summary>
        /// There are no comments for CountryRegionCurrency in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<CountryRegionCurrency> CountryRegionCurrency
        {
            get
            {
                if ((this._CountryRegionCurrency == null))
                {
                    this._CountryRegionCurrency = base.CreateQuery<CountryRegionCurrency>("[CountryRegionCurrency]");
                }
                return this._CountryRegionCurrency;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<CountryRegionCurrency> _CountryRegionCurrency;
        /// <summary>
        /// There are no comments for CreditCard in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<CreditCard> CreditCard
        {
            get
            {
                if ((this._CreditCard == null))
                {
                    this._CreditCard = base.CreateQuery<CreditCard>("[CreditCard]");
                }
                return this._CreditCard;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<CreditCard> _CreditCard;
        /// <summary>
        /// There are no comments for Culture in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Culture> Culture
        {
            get
            {
                if ((this._Culture == null))
                {
                    this._Culture = base.CreateQuery<Culture>("[Culture]");
                }
                return this._Culture;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Culture> _Culture;
        /// <summary>
        /// There are no comments for Currency in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Currency> Currency
        {
            get
            {
                if ((this._Currency == null))
                {
                    this._Currency = base.CreateQuery<Currency>("[Currency]");
                }
                return this._Currency;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Currency> _Currency;
        /// <summary>
        /// There are no comments for CurrencyRate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<CurrencyRate> CurrencyRate
        {
            get
            {
                if ((this._CurrencyRate == null))
                {
                    this._CurrencyRate = base.CreateQuery<CurrencyRate>("[CurrencyRate]");
                }
                return this._CurrencyRate;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<CurrencyRate> _CurrencyRate;
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Customer> Customer
        {
            get
            {
                if ((this._Customer == null))
                {
                    this._Customer = base.CreateQuery<Customer>("[Customer]");
                }
                return this._Customer;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Customer> _Customer;
        /// <summary>
        /// There are no comments for CustomerAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<CustomerAddress> CustomerAddress
        {
            get
            {
                if ((this._CustomerAddress == null))
                {
                    this._CustomerAddress = base.CreateQuery<CustomerAddress>("[CustomerAddress]");
                }
                return this._CustomerAddress;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<CustomerAddress> _CustomerAddress;
        /// <summary>
        /// There are no comments for DatabaseLog in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<DatabaseLog> DatabaseLog
        {
            get
            {
                if ((this._DatabaseLog == null))
                {
                    this._DatabaseLog = base.CreateQuery<DatabaseLog>("[DatabaseLog]");
                }
                return this._DatabaseLog;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<DatabaseLog> _DatabaseLog;
        /// <summary>
        /// There are no comments for Department in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Department> Department
        {
            get
            {
                if ((this._Department == null))
                {
                    this._Department = base.CreateQuery<Department>("[Department]");
                }
                return this._Department;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Department> _Department;
        /// <summary>
        /// There are no comments for Document in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Document> Document
        {
            get
            {
                if ((this._Document == null))
                {
                    this._Document = base.CreateQuery<Document>("[Document]");
                }
                return this._Document;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Document> _Document;
        /// <summary>
        /// There are no comments for Employee in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Employee> Employee
        {
            get
            {
                if ((this._Employee == null))
                {
                    this._Employee = base.CreateQuery<Employee>("[Employee]");
                }
                return this._Employee;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Employee> _Employee;
        /// <summary>
        /// There are no comments for EmployeeAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<EmployeeAddress> EmployeeAddress
        {
            get
            {
                if ((this._EmployeeAddress == null))
                {
                    this._EmployeeAddress = base.CreateQuery<EmployeeAddress>("[EmployeeAddress]");
                }
                return this._EmployeeAddress;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<EmployeeAddress> _EmployeeAddress;
        /// <summary>
        /// There are no comments for EmployeeDepartmentHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<EmployeeDepartmentHistory> EmployeeDepartmentHistory
        {
            get
            {
                if ((this._EmployeeDepartmentHistory == null))
                {
                    this._EmployeeDepartmentHistory = base.CreateQuery<EmployeeDepartmentHistory>("[EmployeeDepartmentHistory]");
                }
                return this._EmployeeDepartmentHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<EmployeeDepartmentHistory> _EmployeeDepartmentHistory;
        /// <summary>
        /// There are no comments for EmployeePayHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<EmployeePayHistory> EmployeePayHistory
        {
            get
            {
                if ((this._EmployeePayHistory == null))
                {
                    this._EmployeePayHistory = base.CreateQuery<EmployeePayHistory>("[EmployeePayHistory]");
                }
                return this._EmployeePayHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<EmployeePayHistory> _EmployeePayHistory;
        /// <summary>
        /// There are no comments for ErrorLog in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ErrorLog> ErrorLog
        {
            get
            {
                if ((this._ErrorLog == null))
                {
                    this._ErrorLog = base.CreateQuery<ErrorLog>("[ErrorLog]");
                }
                return this._ErrorLog;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ErrorLog> _ErrorLog;
        /// <summary>
        /// There are no comments for Illustration in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Illustration> Illustration
        {
            get
            {
                if ((this._Illustration == null))
                {
                    this._Illustration = base.CreateQuery<Illustration>("[Illustration]");
                }
                return this._Illustration;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Illustration> _Illustration;
        /// <summary>
        /// There are no comments for Individual in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Individual> Individual
        {
            get
            {
                if ((this._Individual == null))
                {
                    this._Individual = base.CreateQuery<Individual>("[Individual]");
                }
                return this._Individual;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Individual> _Individual;
        /// <summary>
        /// There are no comments for JobCandidate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<JobCandidate> JobCandidate
        {
            get
            {
                if ((this._JobCandidate == null))
                {
                    this._JobCandidate = base.CreateQuery<JobCandidate>("[JobCandidate]");
                }
                return this._JobCandidate;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<JobCandidate> _JobCandidate;
        /// <summary>
        /// There are no comments for Location in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Location> Location
        {
            get
            {
                if ((this._Location == null))
                {
                    this._Location = base.CreateQuery<Location>("[Location]");
                }
                return this._Location;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Location> _Location;
        /// <summary>
        /// There are no comments for Product in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Product> Product
        {
            get
            {
                if ((this._Product == null))
                {
                    this._Product = base.CreateQuery<Product>("[Product]");
                }
                return this._Product;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Product> _Product;
        /// <summary>
        /// There are no comments for ProductCategory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductCategory> ProductCategory
        {
            get
            {
                if ((this._ProductCategory == null))
                {
                    this._ProductCategory = base.CreateQuery<ProductCategory>("[ProductCategory]");
                }
                return this._ProductCategory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductCategory> _ProductCategory;
        /// <summary>
        /// There are no comments for ProductCostHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductCostHistory> ProductCostHistory
        {
            get
            {
                if ((this._ProductCostHistory == null))
                {
                    this._ProductCostHistory = base.CreateQuery<ProductCostHistory>("[ProductCostHistory]");
                }
                return this._ProductCostHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductCostHistory> _ProductCostHistory;
        /// <summary>
        /// There are no comments for ProductDescription in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductDescription> ProductDescription
        {
            get
            {
                if ((this._ProductDescription == null))
                {
                    this._ProductDescription = base.CreateQuery<ProductDescription>("[ProductDescription]");
                }
                return this._ProductDescription;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductDescription> _ProductDescription;
        /// <summary>
        /// There are no comments for ProductDocument in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductDocument> ProductDocument
        {
            get
            {
                if ((this._ProductDocument == null))
                {
                    this._ProductDocument = base.CreateQuery<ProductDocument>("[ProductDocument]");
                }
                return this._ProductDocument;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductDocument> _ProductDocument;
        /// <summary>
        /// There are no comments for ProductInventory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductInventory> ProductInventory
        {
            get
            {
                if ((this._ProductInventory == null))
                {
                    this._ProductInventory = base.CreateQuery<ProductInventory>("[ProductInventory]");
                }
                return this._ProductInventory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductInventory> _ProductInventory;
        /// <summary>
        /// There are no comments for ProductListPriceHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductListPriceHistory> ProductListPriceHistory
        {
            get
            {
                if ((this._ProductListPriceHistory == null))
                {
                    this._ProductListPriceHistory = base.CreateQuery<ProductListPriceHistory>("[ProductListPriceHistory]");
                }
                return this._ProductListPriceHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductListPriceHistory> _ProductListPriceHistory;
        /// <summary>
        /// There are no comments for ProductModel in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductModel> ProductModel
        {
            get
            {
                if ((this._ProductModel == null))
                {
                    this._ProductModel = base.CreateQuery<ProductModel>("[ProductModel]");
                }
                return this._ProductModel;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductModel> _ProductModel;
        /// <summary>
        /// There are no comments for ProductModelIllustration in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductModelIllustration> ProductModelIllustration
        {
            get
            {
                if ((this._ProductModelIllustration == null))
                {
                    this._ProductModelIllustration = base.CreateQuery<ProductModelIllustration>("[ProductModelIllustration]");
                }
                return this._ProductModelIllustration;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductModelIllustration> _ProductModelIllustration;
        /// <summary>
        /// There are no comments for ProductModelProductDescriptionCulture in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductModelProductDescriptionCulture> ProductModelProductDescriptionCulture
        {
            get
            {
                if ((this._ProductModelProductDescriptionCulture == null))
                {
                    this._ProductModelProductDescriptionCulture = base.CreateQuery<ProductModelProductDescriptionCulture>("[ProductModelProductDescriptionCulture]");
                }
                return this._ProductModelProductDescriptionCulture;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductModelProductDescriptionCulture> _ProductModelProductDescriptionCulture;
        /// <summary>
        /// There are no comments for ProductPhoto in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductPhoto> ProductPhoto
        {
            get
            {
                if ((this._ProductPhoto == null))
                {
                    this._ProductPhoto = base.CreateQuery<ProductPhoto>("[ProductPhoto]");
                }
                return this._ProductPhoto;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductPhoto> _ProductPhoto;
        /// <summary>
        /// There are no comments for ProductProductPhoto in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductProductPhoto> ProductProductPhoto
        {
            get
            {
                if ((this._ProductProductPhoto == null))
                {
                    this._ProductProductPhoto = base.CreateQuery<ProductProductPhoto>("[ProductProductPhoto]");
                }
                return this._ProductProductPhoto;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductProductPhoto> _ProductProductPhoto;
        /// <summary>
        /// There are no comments for ProductReview in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductReview> ProductReview
        {
            get
            {
                if ((this._ProductReview == null))
                {
                    this._ProductReview = base.CreateQuery<ProductReview>("[ProductReview]");
                }
                return this._ProductReview;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductReview> _ProductReview;
        /// <summary>
        /// There are no comments for ProductSubcategory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductSubcategory> ProductSubcategory
        {
            get
            {
                if ((this._ProductSubcategory == null))
                {
                    this._ProductSubcategory = base.CreateQuery<ProductSubcategory>("[ProductSubcategory]");
                }
                return this._ProductSubcategory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductSubcategory> _ProductSubcategory;
        /// <summary>
        /// There are no comments for ProductVendor in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ProductVendor> ProductVendor
        {
            get
            {
                if ((this._ProductVendor == null))
                {
                    this._ProductVendor = base.CreateQuery<ProductVendor>("[ProductVendor]");
                }
                return this._ProductVendor;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ProductVendor> _ProductVendor;
        /// <summary>
        /// There are no comments for PurchaseOrderDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<PurchaseOrderDetail> PurchaseOrderDetail
        {
            get
            {
                if ((this._PurchaseOrderDetail == null))
                {
                    this._PurchaseOrderDetail = base.CreateQuery<PurchaseOrderDetail>("[PurchaseOrderDetail]");
                }
                return this._PurchaseOrderDetail;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<PurchaseOrderDetail> _PurchaseOrderDetail;
        /// <summary>
        /// There are no comments for PurchaseOrderHeader in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<PurchaseOrderHeader> PurchaseOrderHeader
        {
            get
            {
                if ((this._PurchaseOrderHeader == null))
                {
                    this._PurchaseOrderHeader = base.CreateQuery<PurchaseOrderHeader>("[PurchaseOrderHeader]");
                }
                return this._PurchaseOrderHeader;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<PurchaseOrderHeader> _PurchaseOrderHeader;
        /// <summary>
        /// There are no comments for SalesOrderDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesOrderDetail> SalesOrderDetail
        {
            get
            {
                if ((this._SalesOrderDetail == null))
                {
                    this._SalesOrderDetail = base.CreateQuery<SalesOrderDetail>("[SalesOrderDetail]");
                }
                return this._SalesOrderDetail;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesOrderDetail> _SalesOrderDetail;
        /// <summary>
        /// There are no comments for SalesOrderHeader in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesOrderHeader> SalesOrderHeader
        {
            get
            {
                if ((this._SalesOrderHeader == null))
                {
                    this._SalesOrderHeader = base.CreateQuery<SalesOrderHeader>("[SalesOrderHeader]");
                }
                return this._SalesOrderHeader;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesOrderHeader> _SalesOrderHeader;
        /// <summary>
        /// There are no comments for SalesOrderHeaderSalesReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesOrderHeaderSalesReason> SalesOrderHeaderSalesReason
        {
            get
            {
                if ((this._SalesOrderHeaderSalesReason == null))
                {
                    this._SalesOrderHeaderSalesReason = base.CreateQuery<SalesOrderHeaderSalesReason>("[SalesOrderHeaderSalesReason]");
                }
                return this._SalesOrderHeaderSalesReason;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesOrderHeaderSalesReason> _SalesOrderHeaderSalesReason;
        /// <summary>
        /// There are no comments for SalesPerson in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesPerson> SalesPerson
        {
            get
            {
                if ((this._SalesPerson == null))
                {
                    this._SalesPerson = base.CreateQuery<SalesPerson>("[SalesPerson]");
                }
                return this._SalesPerson;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesPerson> _SalesPerson;
        /// <summary>
        /// There are no comments for SalesPersonQuotaHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesPersonQuotaHistory> SalesPersonQuotaHistory
        {
            get
            {
                if ((this._SalesPersonQuotaHistory == null))
                {
                    this._SalesPersonQuotaHistory = base.CreateQuery<SalesPersonQuotaHistory>("[SalesPersonQuotaHistory]");
                }
                return this._SalesPersonQuotaHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesPersonQuotaHistory> _SalesPersonQuotaHistory;
        /// <summary>
        /// There are no comments for SalesReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesReason> SalesReason
        {
            get
            {
                if ((this._SalesReason == null))
                {
                    this._SalesReason = base.CreateQuery<SalesReason>("[SalesReason]");
                }
                return this._SalesReason;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesReason> _SalesReason;
        /// <summary>
        /// There are no comments for SalesTaxRate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesTaxRate> SalesTaxRate
        {
            get
            {
                if ((this._SalesTaxRate == null))
                {
                    this._SalesTaxRate = base.CreateQuery<SalesTaxRate>("[SalesTaxRate]");
                }
                return this._SalesTaxRate;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesTaxRate> _SalesTaxRate;
        /// <summary>
        /// There are no comments for SalesTerritory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesTerritory> SalesTerritory
        {
            get
            {
                if ((this._SalesTerritory == null))
                {
                    this._SalesTerritory = base.CreateQuery<SalesTerritory>("[SalesTerritory]");
                }
                return this._SalesTerritory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesTerritory> _SalesTerritory;
        /// <summary>
        /// There are no comments for SalesTerritoryHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SalesTerritoryHistory> SalesTerritoryHistory
        {
            get
            {
                if ((this._SalesTerritoryHistory == null))
                {
                    this._SalesTerritoryHistory = base.CreateQuery<SalesTerritoryHistory>("[SalesTerritoryHistory]");
                }
                return this._SalesTerritoryHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SalesTerritoryHistory> _SalesTerritoryHistory;
        /// <summary>
        /// There are no comments for ScrapReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ScrapReason> ScrapReason
        {
            get
            {
                if ((this._ScrapReason == null))
                {
                    this._ScrapReason = base.CreateQuery<ScrapReason>("[ScrapReason]");
                }
                return this._ScrapReason;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ScrapReason> _ScrapReason;
        /// <summary>
        /// There are no comments for Shift in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Shift> Shift
        {
            get
            {
                if ((this._Shift == null))
                {
                    this._Shift = base.CreateQuery<Shift>("[Shift]");
                }
                return this._Shift;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Shift> _Shift;
        /// <summary>
        /// There are no comments for ShipMethod in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ShipMethod> ShipMethod
        {
            get
            {
                if ((this._ShipMethod == null))
                {
                    this._ShipMethod = base.CreateQuery<ShipMethod>("[ShipMethod]");
                }
                return this._ShipMethod;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ShipMethod> _ShipMethod;
        /// <summary>
        /// There are no comments for ShoppingCartItem in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<ShoppingCartItem> ShoppingCartItem
        {
            get
            {
                if ((this._ShoppingCartItem == null))
                {
                    this._ShoppingCartItem = base.CreateQuery<ShoppingCartItem>("[ShoppingCartItem]");
                }
                return this._ShoppingCartItem;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<ShoppingCartItem> _ShoppingCartItem;
        /// <summary>
        /// There are no comments for SpecialOffer in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SpecialOffer> SpecialOffer
        {
            get
            {
                if ((this._SpecialOffer == null))
                {
                    this._SpecialOffer = base.CreateQuery<SpecialOffer>("[SpecialOffer]");
                }
                return this._SpecialOffer;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SpecialOffer> _SpecialOffer;
        /// <summary>
        /// There are no comments for SpecialOfferProduct in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<SpecialOfferProduct> SpecialOfferProduct
        {
            get
            {
                if ((this._SpecialOfferProduct == null))
                {
                    this._SpecialOfferProduct = base.CreateQuery<SpecialOfferProduct>("[SpecialOfferProduct]");
                }
                return this._SpecialOfferProduct;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<SpecialOfferProduct> _SpecialOfferProduct;
        /// <summary>
        /// There are no comments for StateProvince in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<StateProvince> StateProvince
        {
            get
            {
                if ((this._StateProvince == null))
                {
                    this._StateProvince = base.CreateQuery<StateProvince>("[StateProvince]");
                }
                return this._StateProvince;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<StateProvince> _StateProvince;
        /// <summary>
        /// There are no comments for Store in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Store> Store
        {
            get
            {
                if ((this._Store == null))
                {
                    this._Store = base.CreateQuery<Store>("[Store]");
                }
                return this._Store;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Store> _Store;
        /// <summary>
        /// There are no comments for StoreContact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<StoreContact> StoreContact
        {
            get
            {
                if ((this._StoreContact == null))
                {
                    this._StoreContact = base.CreateQuery<StoreContact>("[StoreContact]");
                }
                return this._StoreContact;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<StoreContact> _StoreContact;
        /// <summary>
        /// There are no comments for TransactionHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<TransactionHistory> TransactionHistory
        {
            get
            {
                if ((this._TransactionHistory == null))
                {
                    this._TransactionHistory = base.CreateQuery<TransactionHistory>("[TransactionHistory]");
                }
                return this._TransactionHistory;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<TransactionHistory> _TransactionHistory;
        /// <summary>
        /// There are no comments for TransactionHistoryArchive in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<TransactionHistoryArchive> TransactionHistoryArchive
        {
            get
            {
                if ((this._TransactionHistoryArchive == null))
                {
                    this._TransactionHistoryArchive = base.CreateQuery<TransactionHistoryArchive>("[TransactionHistoryArchive]");
                }
                return this._TransactionHistoryArchive;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<TransactionHistoryArchive> _TransactionHistoryArchive;
        /// <summary>
        /// There are no comments for UnitMeasure in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<UnitMeasure> UnitMeasure
        {
            get
            {
                if ((this._UnitMeasure == null))
                {
                    this._UnitMeasure = base.CreateQuery<UnitMeasure>("[UnitMeasure]");
                }
                return this._UnitMeasure;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<UnitMeasure> _UnitMeasure;
        /// <summary>
        /// There are no comments for Vendor in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<Vendor> Vendor
        {
            get
            {
                if ((this._Vendor == null))
                {
                    this._Vendor = base.CreateQuery<Vendor>("[Vendor]");
                }
                return this._Vendor;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<Vendor> _Vendor;
        /// <summary>
        /// There are no comments for VendorAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<VendorAddress> VendorAddress
        {
            get
            {
                if ((this._VendorAddress == null))
                {
                    this._VendorAddress = base.CreateQuery<VendorAddress>("[VendorAddress]");
                }
                return this._VendorAddress;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<VendorAddress> _VendorAddress;
        /// <summary>
        /// There are no comments for VendorContact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<VendorContact> VendorContact
        {
            get
            {
                if ((this._VendorContact == null))
                {
                    this._VendorContact = base.CreateQuery<VendorContact>("[VendorContact]");
                }
                return this._VendorContact;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<VendorContact> _VendorContact;
        /// <summary>
        /// There are no comments for WorkOrder in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<WorkOrder> WorkOrder
        {
            get
            {
                if ((this._WorkOrder == null))
                {
                    this._WorkOrder = base.CreateQuery<WorkOrder>("[WorkOrder]");
                }
                return this._WorkOrder;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<WorkOrder> _WorkOrder;
        /// <summary>
        /// There are no comments for WorkOrderRouting in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Data.Objects.ObjectQuery<WorkOrderRouting> WorkOrderRouting
        {
            get
            {
                if ((this._WorkOrderRouting == null))
                {
                    this._WorkOrderRouting = base.CreateQuery<WorkOrderRouting>("[WorkOrderRouting]");
                }
                return this._WorkOrderRouting;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Data.Objects.ObjectQuery<WorkOrderRouting> _WorkOrderRouting;
        /// <summary>
        /// There are no comments for Address in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToAddress(Address address)
        {
            base.AddObject("Address", address);
        }
        /// <summary>
        /// There are no comments for AddressType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToAddressType(AddressType addressType)
        {
            base.AddObject("AddressType", addressType);
        }
        /// <summary>
        /// There are no comments for AwBuildVersion in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToAwBuildVersion(AwBuildVersion awBuildVersion)
        {
            base.AddObject("AwBuildVersion", awBuildVersion);
        }
        /// <summary>
        /// There are no comments for BillOfMaterials in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToBillOfMaterials(BillOfMaterials billOfMaterials)
        {
            base.AddObject("BillOfMaterials", billOfMaterials);
        }
        /// <summary>
        /// There are no comments for Contact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToContact(Contact contact)
        {
            base.AddObject("Contact", contact);
        }
        /// <summary>
        /// There are no comments for ContactCreditCard in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToContactCreditCard(ContactCreditCard contactCreditCard)
        {
            base.AddObject("ContactCreditCard", contactCreditCard);
        }
        /// <summary>
        /// There are no comments for ContactType in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToContactType(ContactType contactType)
        {
            base.AddObject("ContactType", contactType);
        }
        /// <summary>
        /// There are no comments for CountryRegion in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCountryRegion(CountryRegion countryRegion)
        {
            base.AddObject("CountryRegion", countryRegion);
        }
        /// <summary>
        /// There are no comments for CountryRegionCurrency in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCountryRegionCurrency(CountryRegionCurrency countryRegionCurrency)
        {
            base.AddObject("CountryRegionCurrency", countryRegionCurrency);
        }
        /// <summary>
        /// There are no comments for CreditCard in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCreditCard(CreditCard creditCard)
        {
            base.AddObject("CreditCard", creditCard);
        }
        /// <summary>
        /// There are no comments for Culture in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCulture(Culture culture)
        {
            base.AddObject("Culture", culture);
        }
        /// <summary>
        /// There are no comments for Currency in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCurrency(Currency currency)
        {
            base.AddObject("Currency", currency);
        }
        /// <summary>
        /// There are no comments for CurrencyRate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCurrencyRate(CurrencyRate currencyRate)
        {
            base.AddObject("CurrencyRate", currencyRate);
        }
        /// <summary>
        /// There are no comments for Customer in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCustomer(Customer customer)
        {
            base.AddObject("Customer", customer);
        }
        /// <summary>
        /// There are no comments for CustomerAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToCustomerAddress(CustomerAddress customerAddress)
        {
            base.AddObject("CustomerAddress", customerAddress);
        }
        /// <summary>
        /// There are no comments for DatabaseLog in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToDatabaseLog(DatabaseLog databaseLog)
        {
            base.AddObject("DatabaseLog", databaseLog);
        }
        /// <summary>
        /// There are no comments for Department in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToDepartment(Department department)
        {
            base.AddObject("Department", department);
        }
        /// <summary>
        /// There are no comments for Document in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToDocument(Document document)
        {
            base.AddObject("Document", document);
        }
        /// <summary>
        /// There are no comments for Employee in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToEmployee(Employee employee)
        {
            base.AddObject("Employee", employee);
        }
        /// <summary>
        /// There are no comments for EmployeeAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToEmployeeAddress(EmployeeAddress employeeAddress)
        {
            base.AddObject("EmployeeAddress", employeeAddress);
        }
        /// <summary>
        /// There are no comments for EmployeeDepartmentHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToEmployeeDepartmentHistory(EmployeeDepartmentHistory employeeDepartmentHistory)
        {
            base.AddObject("EmployeeDepartmentHistory", employeeDepartmentHistory);
        }
        /// <summary>
        /// There are no comments for EmployeePayHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToEmployeePayHistory(EmployeePayHistory employeePayHistory)
        {
            base.AddObject("EmployeePayHistory", employeePayHistory);
        }
        /// <summary>
        /// There are no comments for ErrorLog in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToErrorLog(ErrorLog errorLog)
        {
            base.AddObject("ErrorLog", errorLog);
        }
        /// <summary>
        /// There are no comments for Illustration in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToIllustration(Illustration illustration)
        {
            base.AddObject("Illustration", illustration);
        }
        /// <summary>
        /// There are no comments for Individual in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToIndividual(Individual individual)
        {
            base.AddObject("Individual", individual);
        }
        /// <summary>
        /// There are no comments for JobCandidate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToJobCandidate(JobCandidate jobCandidate)
        {
            base.AddObject("JobCandidate", jobCandidate);
        }
        /// <summary>
        /// There are no comments for Location in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToLocation(Location location)
        {
            base.AddObject("Location", location);
        }
        /// <summary>
        /// There are no comments for Product in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProduct(Product product)
        {
            base.AddObject("Product", product);
        }
        /// <summary>
        /// There are no comments for ProductCategory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductCategory(ProductCategory productCategory)
        {
            base.AddObject("ProductCategory", productCategory);
        }
        /// <summary>
        /// There are no comments for ProductCostHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductCostHistory(ProductCostHistory productCostHistory)
        {
            base.AddObject("ProductCostHistory", productCostHistory);
        }
        /// <summary>
        /// There are no comments for ProductDescription in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductDescription(ProductDescription productDescription)
        {
            base.AddObject("ProductDescription", productDescription);
        }
        /// <summary>
        /// There are no comments for ProductDocument in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductDocument(ProductDocument productDocument)
        {
            base.AddObject("ProductDocument", productDocument);
        }
        /// <summary>
        /// There are no comments for ProductInventory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductInventory(ProductInventory productInventory)
        {
            base.AddObject("ProductInventory", productInventory);
        }
        /// <summary>
        /// There are no comments for ProductListPriceHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductListPriceHistory(ProductListPriceHistory productListPriceHistory)
        {
            base.AddObject("ProductListPriceHistory", productListPriceHistory);
        }
        /// <summary>
        /// There are no comments for ProductModel in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductModel(ProductModel productModel)
        {
            base.AddObject("ProductModel", productModel);
        }
        /// <summary>
        /// There are no comments for ProductModelIllustration in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductModelIllustration(ProductModelIllustration productModelIllustration)
        {
            base.AddObject("ProductModelIllustration", productModelIllustration);
        }
        /// <summary>
        /// There are no comments for ProductModelProductDescriptionCulture in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture productModelProductDescriptionCulture)
        {
            base.AddObject("ProductModelProductDescriptionCulture", productModelProductDescriptionCulture);
        }
        /// <summary>
        /// There are no comments for ProductPhoto in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductPhoto(ProductPhoto productPhoto)
        {
            base.AddObject("ProductPhoto", productPhoto);
        }
        /// <summary>
        /// There are no comments for ProductProductPhoto in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductProductPhoto(ProductProductPhoto productProductPhoto)
        {
            base.AddObject("ProductProductPhoto", productProductPhoto);
        }
        /// <summary>
        /// There are no comments for ProductReview in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductReview(ProductReview productReview)
        {
            base.AddObject("ProductReview", productReview);
        }
        /// <summary>
        /// There are no comments for ProductSubcategory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductSubcategory(ProductSubcategory productSubcategory)
        {
            base.AddObject("ProductSubcategory", productSubcategory);
        }
        /// <summary>
        /// There are no comments for ProductVendor in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToProductVendor(ProductVendor productVendor)
        {
            base.AddObject("ProductVendor", productVendor);
        }
        /// <summary>
        /// There are no comments for PurchaseOrderDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToPurchaseOrderDetail(PurchaseOrderDetail purchaseOrderDetail)
        {
            base.AddObject("PurchaseOrderDetail", purchaseOrderDetail);
        }
        /// <summary>
        /// There are no comments for PurchaseOrderHeader in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToPurchaseOrderHeader(PurchaseOrderHeader purchaseOrderHeader)
        {
            base.AddObject("PurchaseOrderHeader", purchaseOrderHeader);
        }
        /// <summary>
        /// There are no comments for SalesOrderDetail in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesOrderDetail(SalesOrderDetail salesOrderDetail)
        {
            base.AddObject("SalesOrderDetail", salesOrderDetail);
        }
        /// <summary>
        /// There are no comments for SalesOrderHeader in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesOrderHeader(SalesOrderHeader salesOrderHeader)
        {
            base.AddObject("SalesOrderHeader", salesOrderHeader);
        }
        /// <summary>
        /// There are no comments for SalesOrderHeaderSalesReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesOrderHeaderSalesReason(SalesOrderHeaderSalesReason salesOrderHeaderSalesReason)
        {
            base.AddObject("SalesOrderHeaderSalesReason", salesOrderHeaderSalesReason);
        }
        /// <summary>
        /// There are no comments for SalesPerson in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesPerson(SalesPerson salesPerson)
        {
            base.AddObject("SalesPerson", salesPerson);
        }
        /// <summary>
        /// There are no comments for SalesPersonQuotaHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesPersonQuotaHistory(SalesPersonQuotaHistory salesPersonQuotaHistory)
        {
            base.AddObject("SalesPersonQuotaHistory", salesPersonQuotaHistory);
        }
        /// <summary>
        /// There are no comments for SalesReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesReason(SalesReason salesReason)
        {
            base.AddObject("SalesReason", salesReason);
        }
        /// <summary>
        /// There are no comments for SalesTaxRate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesTaxRate(SalesTaxRate salesTaxRate)
        {
            base.AddObject("SalesTaxRate", salesTaxRate);
        }
        /// <summary>
        /// There are no comments for SalesTerritory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesTerritory(SalesTerritory salesTerritory)
        {
            base.AddObject("SalesTerritory", salesTerritory);
        }
        /// <summary>
        /// There are no comments for SalesTerritoryHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSalesTerritoryHistory(SalesTerritoryHistory salesTerritoryHistory)
        {
            base.AddObject("SalesTerritoryHistory", salesTerritoryHistory);
        }
        /// <summary>
        /// There are no comments for ScrapReason in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToScrapReason(ScrapReason scrapReason)
        {
            base.AddObject("ScrapReason", scrapReason);
        }
        /// <summary>
        /// There are no comments for Shift in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToShift(Shift shift)
        {
            base.AddObject("Shift", shift);
        }
        /// <summary>
        /// There are no comments for ShipMethod in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToShipMethod(ShipMethod shipMethod)
        {
            base.AddObject("ShipMethod", shipMethod);
        }
        /// <summary>
        /// There are no comments for ShoppingCartItem in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToShoppingCartItem(ShoppingCartItem shoppingCartItem)
        {
            base.AddObject("ShoppingCartItem", shoppingCartItem);
        }
        /// <summary>
        /// There are no comments for SpecialOffer in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSpecialOffer(SpecialOffer specialOffer)
        {
            base.AddObject("SpecialOffer", specialOffer);
        }
        /// <summary>
        /// There are no comments for SpecialOfferProduct in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToSpecialOfferProduct(SpecialOfferProduct specialOfferProduct)
        {
            base.AddObject("SpecialOfferProduct", specialOfferProduct);
        }
        /// <summary>
        /// There are no comments for StateProvince in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToStateProvince(StateProvince stateProvince)
        {
            base.AddObject("StateProvince", stateProvince);
        }
        /// <summary>
        /// There are no comments for Store in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToStore(Store store)
        {
            base.AddObject("Store", store);
        }
        /// <summary>
        /// There are no comments for StoreContact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToStoreContact(StoreContact storeContact)
        {
            base.AddObject("StoreContact", storeContact);
        }
        /// <summary>
        /// There are no comments for TransactionHistory in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToTransactionHistory(TransactionHistory transactionHistory)
        {
            base.AddObject("TransactionHistory", transactionHistory);
        }
        /// <summary>
        /// There are no comments for TransactionHistoryArchive in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToTransactionHistoryArchive(TransactionHistoryArchive transactionHistoryArchive)
        {
            base.AddObject("TransactionHistoryArchive", transactionHistoryArchive);
        }
        /// <summary>
        /// There are no comments for UnitMeasure in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToUnitMeasure(UnitMeasure unitMeasure)
        {
            base.AddObject("UnitMeasure", unitMeasure);
        }
        /// <summary>
        /// There are no comments for Vendor in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToVendor(Vendor vendor)
        {
            base.AddObject("Vendor", vendor);
        }
        /// <summary>
        /// There are no comments for VendorAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToVendorAddress(VendorAddress vendorAddress)
        {
            base.AddObject("VendorAddress", vendorAddress);
        }
        /// <summary>
        /// There are no comments for VendorContact in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToVendorContact(VendorContact vendorContact)
        {
            base.AddObject("VendorContact", vendorContact);
        }
        /// <summary>
        /// There are no comments for WorkOrder in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToWorkOrder(WorkOrder workOrder)
        {
            base.AddObject("WorkOrder", workOrder);
        }
        /// <summary>
        /// There are no comments for WorkOrderRouting in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public void AddToWorkOrderRouting(WorkOrderRouting workOrderRouting)
        {
            base.AddObject("WorkOrderRouting", workOrderRouting);
        }
    }
    /// <summary>
    /// Street address information for customers, employees, and vendors.
    /// </summary>
    /// <KeyProperties>
    /// AddressId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Address")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Address : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Address object.
        /// </summary>
        /// <param name="addressId">Initial value of AddressId.</param>
        /// <param name="addressLine1">Initial value of AddressLine1.</param>
        /// <param name="city">Initial value of City.</param>
        /// <param name="postalCode">Initial value of PostalCode.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Address CreateAddress(int addressId, string addressLine1, string city, string postalCode, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Address address = new Address();
            address.AddressId = addressId;
            address.AddressLine1 = addressLine1;
            address.City = city;
            address.PostalCode = postalCode;
            address.Rowguid = rowguid;
            address.ModifiedDate = modifiedDate;
            return address;
        }
        /// <summary>
        /// There are no comments for property AddressId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int AddressId
        {
            get
            {
                return this._AddressId;
            }
            set
            {
                this.OnAddressIdChanging(value);
                this.ReportPropertyChanging("AddressId");
                this._AddressId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AddressId");
                this.OnAddressIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _AddressId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanged();
        /// <summary>
        /// First street address line.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AddressLine1
        {
            get
            {
                return this._AddressLine1;
            }
            set
            {
                this.OnAddressLine1Changing(value);
                this.ReportPropertyChanging("AddressLine1");
                this._AddressLine1 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("AddressLine1");
                this.OnAddressLine1Changed();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AddressLine1;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressLine1Changing(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressLine1Changed();
        /// <summary>
        /// Second street address line.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AddressLine2
        {
            get
            {
                return this._AddressLine2;
            }
            set
            {
                this.OnAddressLine2Changing(value);
                this.ReportPropertyChanging("AddressLine2");
                this._AddressLine2 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("AddressLine2");
                this.OnAddressLine2Changed();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AddressLine2;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressLine2Changing(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressLine2Changed();
        /// <summary>
        /// Name of the city.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string City
        {
            get
            {
                return this._City;
            }
            set
            {
                this.OnCityChanging(value);
                this.ReportPropertyChanging("City");
                this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("City");
                this.OnCityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _City;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCityChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCityChanged();
        /// <summary>
        /// Postal code for the street address.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string PostalCode
        {
            get
            {
                return this._PostalCode;
            }
            set
            {
                this.OnPostalCodeChanging(value);
                this.ReportPropertyChanging("PostalCode");
                this._PostalCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("PostalCode");
                this.OnPostalCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _PostalCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPostalCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPostalCodeChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for StateProvinceIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Address_StateProvinceId", "StateProvince")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public StateProvince StateProvinceIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.Address_StateProvinceId", "StateProvince").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.Address_StateProvinceId", "StateProvince").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for StateProvinceIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<StateProvince> StateProvinceIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.Address_StateProvinceId", "StateProvince");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<StateProvince>("AdvWorksModel.Address_StateProvinceId", "StateProvince", value);
                }
            }
        }
    }
    /// <summary>
    /// Types of addresses stored in the Address table.
    /// </summary>
    /// <KeyProperties>
    /// AddressTypeId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="AddressType")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class AddressType : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new AddressType object.
        /// </summary>
        /// <param name="addressTypeId">Initial value of AddressTypeId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static AddressType CreateAddressType(int addressTypeId, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            AddressType addressType = new AddressType();
            addressType.AddressTypeId = addressTypeId;
            addressType.Name = name;
            addressType.Rowguid = rowguid;
            addressType.ModifiedDate = modifiedDate;
            return addressType;
        }
        /// <summary>
        /// There are no comments for property AddressTypeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int AddressTypeId
        {
            get
            {
                return this._AddressTypeId;
            }
            set
            {
                this.OnAddressTypeIdChanging(value);
                this.ReportPropertyChanging("AddressTypeId");
                this._AddressTypeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AddressTypeId");
                this.OnAddressTypeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _AddressTypeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressTypeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressTypeIdChanged();
        /// <summary>
        /// Address type description. For example, Billing, Home, or Shipping.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Current version number of the AdventureWorks sample database.
    /// </summary>
    /// <KeyProperties>
    /// SystemInformationId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="AwBuildVersion")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class AwBuildVersion : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new AwBuildVersion object.
        /// </summary>
        /// <param name="systemInformationId">Initial value of SystemInformationId.</param>
        /// <param name="databaseVersion">Initial value of DatabaseVersion.</param>
        /// <param name="versionDate">Initial value of VersionDate.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static AwBuildVersion CreateAwBuildVersion(byte systemInformationId, string databaseVersion, global::System.DateTime versionDate, global::System.DateTime modifiedDate)
        {
            AwBuildVersion awBuildVersion = new AwBuildVersion();
            awBuildVersion.SystemInformationId = systemInformationId;
            awBuildVersion.DatabaseVersion = databaseVersion;
            awBuildVersion.VersionDate = versionDate;
            awBuildVersion.ModifiedDate = modifiedDate;
            return awBuildVersion;
        }
        /// <summary>
        /// There are no comments for property SystemInformationId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte SystemInformationId
        {
            get
            {
                return this._SystemInformationId;
            }
            set
            {
                this.OnSystemInformationIdChanging(value);
                this.ReportPropertyChanging("SystemInformationId");
                this._SystemInformationId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SystemInformationId");
                this.OnSystemInformationIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _SystemInformationId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSystemInformationIdChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSystemInformationIdChanged();
        /// <summary>
        /// Version number of the database in 9.yy.mm.dd.00 format.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string DatabaseVersion
        {
            get
            {
                return this._DatabaseVersion;
            }
            set
            {
                this.OnDatabaseVersionChanging(value);
                this.ReportPropertyChanging("DatabaseVersion");
                this._DatabaseVersion = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("DatabaseVersion");
                this.OnDatabaseVersionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _DatabaseVersion;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseVersionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseVersionChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime VersionDate
        {
            get
            {
                return this._VersionDate;
            }
            set
            {
                this.OnVersionDateChanging(value);
                this.ReportPropertyChanging("VersionDate");
                this._VersionDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VersionDate");
                this.OnVersionDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _VersionDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVersionDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVersionDateChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
    /// </summary>
    /// <KeyProperties>
    /// BillOfMaterialsId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="BillOfMaterials")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class BillOfMaterials : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new BillOfMaterials object.
        /// </summary>
        /// <param name="billOfMaterialsId">Initial value of BillOfMaterialsId.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="bomLevel">Initial value of BomLevel.</param>
        /// <param name="perAssemblyQty">Initial value of PerAssemblyQty.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static BillOfMaterials CreateBillOfMaterials(int billOfMaterialsId, global::System.DateTime startDate, short bomLevel, decimal perAssemblyQty, global::System.DateTime modifiedDate)
        {
            BillOfMaterials billOfMaterials = new BillOfMaterials();
            billOfMaterials.BillOfMaterialsId = billOfMaterialsId;
            billOfMaterials.StartDate = startDate;
            billOfMaterials.BomLevel = bomLevel;
            billOfMaterials.PerAssemblyQty = perAssemblyQty;
            billOfMaterials.ModifiedDate = modifiedDate;
            return billOfMaterials;
        }
        /// <summary>
        /// There are no comments for property BillOfMaterialsId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int BillOfMaterialsId
        {
            get
            {
                return this._BillOfMaterialsId;
            }
            set
            {
                this.OnBillOfMaterialsIdChanging(value);
                this.ReportPropertyChanging("BillOfMaterialsId");
                this._BillOfMaterialsId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("BillOfMaterialsId");
                this.OnBillOfMaterialsIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _BillOfMaterialsId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBillOfMaterialsIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBillOfMaterialsIdChanged();
        /// <summary>
        /// Date the component started being used in the assembly item.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Date the component stopped being used in the assembly item.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Indicates the depth the component is from its parent (AssemblyID).
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short BomLevel
        {
            get
            {
                return this._BomLevel;
            }
            set
            {
                this.OnBomLevelChanging(value);
                this.ReportPropertyChanging("BomLevel");
                this._BomLevel = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("BomLevel");
                this.OnBomLevelChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _BomLevel;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBomLevelChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBomLevelChanged();
        /// <summary>
        /// Quantity of the component needed to create the assembly.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal PerAssemblyQty
        {
            get
            {
                return this._PerAssemblyQty;
            }
            set
            {
                this.OnPerAssemblyQtyChanging(value);
                this.ReportPropertyChanging("PerAssemblyQty");
                this._PerAssemblyQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PerAssemblyQty");
                this.OnPerAssemblyQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _PerAssemblyQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPerAssemblyQtyChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPerAssemblyQtyChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductAssemblyIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "BillOfMaterials_ProductAssemblyId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductAssemblyIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ProductAssemblyId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ProductAssemblyId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductAssemblyIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductAssemblyIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ProductAssemblyId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ProductAssemblyId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ComponentIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "BillOfMaterials_ComponentId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ComponentIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ComponentId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ComponentId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ComponentIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ComponentIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ComponentId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.BillOfMaterials_ComponentId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for UnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "BillOfMaterials_UnitMeasureCode", "UnitMeasure")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UnitMeasure UnitMeasureCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.BillOfMaterials_UnitMeasureCode", "UnitMeasure").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.BillOfMaterials_UnitMeasureCode", "UnitMeasure").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for UnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UnitMeasure> UnitMeasureCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.BillOfMaterials_UnitMeasureCode", "UnitMeasure");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UnitMeasure>("AdvWorksModel.BillOfMaterials_UnitMeasureCode", "UnitMeasure", value);
                }
            }
        }
    }
    /// <summary>
    /// Names of each employee, customer contact, and vendor contact.
    /// </summary>
    /// <KeyProperties>
    /// ContactId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Contact")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Contact : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Contact object.
        /// </summary>
        /// <param name="contactId">Initial value of ContactId.</param>
        /// <param name="nameStyle">Initial value of NameStyle.</param>
        /// <param name="firstName">Initial value of FirstName.</param>
        /// <param name="lastName">Initial value of LastName.</param>
        /// <param name="emailPromotion">Initial value of EmailPromotion.</param>
        /// <param name="passwordHash">Initial value of PasswordHash.</param>
        /// <param name="passwordSalt">Initial value of PasswordSalt.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Contact CreateContact(int contactId, bool nameStyle, string firstName, string lastName, int emailPromotion, string passwordHash, string passwordSalt, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Contact contact = new Contact();
            contact.ContactId = contactId;
            contact.NameStyle = nameStyle;
            contact.FirstName = firstName;
            contact.LastName = lastName;
            contact.EmailPromotion = emailPromotion;
            contact.PasswordHash = passwordHash;
            contact.PasswordSalt = passwordSalt;
            contact.Rowguid = rowguid;
            contact.ModifiedDate = modifiedDate;
            return contact;
        }
        /// <summary>
        /// There are no comments for property ContactId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ContactId
        {
            get
            {
                return this._ContactId;
            }
            set
            {
                this.OnContactIdChanging(value);
                this.ReportPropertyChanging("ContactId");
                this._ContactId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ContactId");
                this.OnContactIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ContactId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanged();
        /// <summary>
        /// 0 = The data in FirstName and LastName are stored in western style (first name, last name) order.  1 = Eastern style (last name, first name) order.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool NameStyle
        {
            get
            {
                return this._NameStyle;
            }
            set
            {
                this.OnNameStyleChanging(value);
                this.ReportPropertyChanging("NameStyle");
                this._NameStyle = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("NameStyle");
                this.OnNameStyleChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _NameStyle;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameStyleChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameStyleChanged();
        /// <summary>
        /// A courtesy title. For example, Mr. or Ms.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Title
        {
            get
            {
                return this._Title;
            }
            set
            {
                this.OnTitleChanging(value);
                this.ReportPropertyChanging("Title");
                this._Title = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Title");
                this.OnTitleChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Title;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanged();
        /// <summary>
        /// First name of the person.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string FirstName
        {
            get
            {
                return this._FirstName;
            }
            set
            {
                this.OnFirstNameChanging(value);
                this.ReportPropertyChanging("FirstName");
                this._FirstName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("FirstName");
                this.OnFirstNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _FirstName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFirstNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFirstNameChanged();
        /// <summary>
        /// Middle name or middle initial of the person.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string MiddleName
        {
            get
            {
                return this._MiddleName;
            }
            set
            {
                this.OnMiddleNameChanging(value);
                this.ReportPropertyChanging("MiddleName");
                this._MiddleName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("MiddleName");
                this.OnMiddleNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _MiddleName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMiddleNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMiddleNameChanged();
        /// <summary>
        /// Last name of the person.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string LastName
        {
            get
            {
                return this._LastName;
            }
            set
            {
                this.OnLastNameChanging(value);
                this.ReportPropertyChanging("LastName");
                this._LastName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("LastName");
                this.OnLastNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _LastName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastNameChanged();
        /// <summary>
        /// Surname suffix. For example, Sr. or Jr.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Suffix
        {
            get
            {
                return this._Suffix;
            }
            set
            {
                this.OnSuffixChanging(value);
                this.ReportPropertyChanging("Suffix");
                this._Suffix = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Suffix");
                this.OnSuffixChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Suffix;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSuffixChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSuffixChanged();
        /// <summary>
        /// E-mail address for the person.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string EmailAddress
        {
            get
            {
                return this._EmailAddress;
            }
            set
            {
                this.OnEmailAddressChanging(value);
                this.ReportPropertyChanging("EmailAddress");
                this._EmailAddress = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("EmailAddress");
                this.OnEmailAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _EmailAddress;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailAddressChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailAddressChanged();
        /// <summary>
        /// 0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int EmailPromotion
        {
            get
            {
                return this._EmailPromotion;
            }
            set
            {
                this.OnEmailPromotionChanging(value);
                this.ReportPropertyChanging("EmailPromotion");
                this._EmailPromotion = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EmailPromotion");
                this.OnEmailPromotionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _EmailPromotion;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailPromotionChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailPromotionChanged();
        /// <summary>
        /// Phone number associated with the person.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Phone
        {
            get
            {
                return this._Phone;
            }
            set
            {
                this.OnPhoneChanging(value);
                this.ReportPropertyChanging("Phone");
                this._Phone = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Phone");
                this.OnPhoneChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Phone;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPhoneChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPhoneChanged();
        /// <summary>
        /// Password for the e-mail account.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string PasswordHash
        {
            get
            {
                return this._PasswordHash;
            }
            set
            {
                this.OnPasswordHashChanging(value);
                this.ReportPropertyChanging("PasswordHash");
                this._PasswordHash = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("PasswordHash");
                this.OnPasswordHashChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _PasswordHash;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPasswordHashChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPasswordHashChanged();
        /// <summary>
        /// Random value concatenated with the password string before the password is hashed.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string PasswordSalt
        {
            get
            {
                return this._PasswordSalt;
            }
            set
            {
                this.OnPasswordSaltChanging(value);
                this.ReportPropertyChanging("PasswordSalt");
                this._PasswordSalt = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("PasswordSalt");
                this.OnPasswordSaltChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _PasswordSalt;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPasswordSaltChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPasswordSaltChanged();
        /// <summary>
        /// Additional contact information about the person stored in xml format.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AdditionalContactInfo
        {
            get
            {
                return this._AdditionalContactInfo;
            }
            set
            {
                this.OnAdditionalContactInfoChanging(value);
                this.ReportPropertyChanging("AdditionalContactInfo");
                this._AdditionalContactInfo = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("AdditionalContactInfo");
                this.OnAdditionalContactInfoChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AdditionalContactInfo;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAdditionalContactInfoChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAdditionalContactInfoChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping customers in the Contact table to their credit card information in the CreditCard table.
    /// </summary>
    /// <KeyProperties>
    /// ContactId
    /// CreditCardId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ContactCreditCard")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ContactCreditCard : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ContactCreditCard object.
        /// </summary>
        /// <param name="contactId">Initial value of ContactId.</param>
        /// <param name="creditCardId">Initial value of CreditCardId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ContactCreditCard CreateContactCreditCard(int contactId, int creditCardId, global::System.DateTime modifiedDate)
        {
            ContactCreditCard contactCreditCard = new ContactCreditCard();
            contactCreditCard.ContactId = contactId;
            contactCreditCard.CreditCardId = creditCardId;
            contactCreditCard.ModifiedDate = modifiedDate;
            return contactCreditCard;
        }
        /// <summary>
        /// Customer identification number. Foreign key to Contact.ContactID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ContactId
        {
            get
            {
                return this._ContactId;
            }
            set
            {
                this.OnContactIdChanging(value);
                this.ReportPropertyChanging("ContactId");
                this._ContactId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ContactId");
                this.OnContactIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ContactId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanged();
        /// <summary>
        /// Credit card identification number. Foreign key to CreditCard.CreditCardID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CreditCardId
        {
            get
            {
                return this._CreditCardId;
            }
            set
            {
                this.OnCreditCardIdChanging(value);
                this.ReportPropertyChanging("CreditCardId");
                this._CreditCardId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CreditCardId");
                this.OnCreditCardIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CreditCardId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ContactCreditCard_ContactId", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.ContactCreditCard_ContactId", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.ContactCreditCard_ContactId", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.ContactCreditCard_ContactId", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.ContactCreditCard_ContactId", "Contact", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CreditCardIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ContactCreditCard_CreditCardId", "CreditCard")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public CreditCard CreditCardIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.ContactCreditCard_CreditCardId", "CreditCard").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.ContactCreditCard_CreditCardId", "CreditCard").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CreditCardIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<CreditCard> CreditCardIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.ContactCreditCard_CreditCardId", "CreditCard");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<CreditCard>("AdvWorksModel.ContactCreditCard_CreditCardId", "CreditCard", value);
                }
            }
        }
    }
    /// <summary>
    /// Lookup table containing the types of contacts stored in Contact.
    /// </summary>
    /// <KeyProperties>
    /// ContactTypeId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ContactType")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ContactType : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ContactType object.
        /// </summary>
        /// <param name="contactTypeId">Initial value of ContactTypeId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ContactType CreateContactType(int contactTypeId, string name, global::System.DateTime modifiedDate)
        {
            ContactType contactType = new ContactType();
            contactType.ContactTypeId = contactTypeId;
            contactType.Name = name;
            contactType.ModifiedDate = modifiedDate;
            return contactType;
        }
        /// <summary>
        /// There are no comments for property ContactTypeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ContactTypeId
        {
            get
            {
                return this._ContactTypeId;
            }
            set
            {
                this.OnContactTypeIdChanging(value);
                this.ReportPropertyChanging("ContactTypeId");
                this._ContactTypeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ContactTypeId");
                this.OnContactTypeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ContactTypeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactTypeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactTypeIdChanged();
        /// <summary>
        /// Contact type description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Lookup table containing the ISO standard codes for countries and regions.
    /// </summary>
    /// <KeyProperties>
    /// CountryRegionCode
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="CountryRegion")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class CountryRegion : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new CountryRegion object.
        /// </summary>
        /// <param name="countryRegionCode">Initial value of CountryRegionCode.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static CountryRegion CreateCountryRegion(string countryRegionCode, string name, global::System.DateTime modifiedDate)
        {
            CountryRegion countryRegion = new CountryRegion();
            countryRegion.CountryRegionCode = countryRegionCode;
            countryRegion.Name = name;
            countryRegion.ModifiedDate = modifiedDate;
            return countryRegion;
        }
        /// <summary>
        /// There are no comments for property CountryRegionCode in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CountryRegionCode
        {
            get
            {
                return this._CountryRegionCode;
            }
            set
            {
                this.OnCountryRegionCodeChanging(value);
                this.ReportPropertyChanging("CountryRegionCode");
                this._CountryRegionCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CountryRegionCode");
                this.OnCountryRegionCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CountryRegionCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanged();
        /// <summary>
        /// Country or region name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping ISO currency codes to a country or region.
    /// </summary>
    /// <KeyProperties>
    /// CountryRegionCode
    /// CurrencyCode
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="CountryRegionCurrency")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class CountryRegionCurrency : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new CountryRegionCurrency object.
        /// </summary>
        /// <param name="countryRegionCode">Initial value of CountryRegionCode.</param>
        /// <param name="currencyCode">Initial value of CurrencyCode.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static CountryRegionCurrency CreateCountryRegionCurrency(string countryRegionCode, string currencyCode, global::System.DateTime modifiedDate)
        {
            CountryRegionCurrency countryRegionCurrency = new CountryRegionCurrency();
            countryRegionCurrency.CountryRegionCode = countryRegionCode;
            countryRegionCurrency.CurrencyCode = currencyCode;
            countryRegionCurrency.ModifiedDate = modifiedDate;
            return countryRegionCurrency;
        }
        /// <summary>
        /// ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CountryRegionCode
        {
            get
            {
                return this._CountryRegionCode;
            }
            set
            {
                this.OnCountryRegionCodeChanging(value);
                this.ReportPropertyChanging("CountryRegionCode");
                this._CountryRegionCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CountryRegionCode");
                this.OnCountryRegionCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CountryRegionCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanged();
        /// <summary>
        /// ISO standard currency code. Foreign key to Currency.CurrencyCode.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CurrencyCode
        {
            get
            {
                return this._CurrencyCode;
            }
            set
            {
                this.OnCurrencyCodeChanging(value);
                this.ReportPropertyChanging("CurrencyCode");
                this._CurrencyCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CurrencyCode");
                this.OnCurrencyCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CurrencyCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyCodeChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for CountryRegionCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CountryRegionCurrency_CountryRegionCode", "CountryRegion")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public CountryRegion CountryRegionCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.CountryRegionCurrency_CountryRegionCode", "CountryRegion").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.CountryRegionCurrency_CountryRegionCode", "CountryRegion").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CountryRegionCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<CountryRegion> CountryRegionCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.CountryRegionCurrency_CountryRegionCode", "CountryRegion");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<CountryRegion>("AdvWorksModel.CountryRegionCurrency_CountryRegionCode", "CountryRegion", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CurrencyCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CountryRegionCurrency_CurrencyCode", "Currency")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Currency CurrencyCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CountryRegionCurrency_CurrencyCode", "Currency").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CountryRegionCurrency_CurrencyCode", "Currency").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CurrencyCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Currency> CurrencyCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CountryRegionCurrency_CurrencyCode", "Currency");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Currency>("AdvWorksModel.CountryRegionCurrency_CurrencyCode", "Currency", value);
                }
            }
        }
    }
    /// <summary>
    /// Customer credit card information.
    /// </summary>
    /// <KeyProperties>
    /// CreditCardId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="CreditCard")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class CreditCard : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new CreditCard object.
        /// </summary>
        /// <param name="creditCardId">Initial value of CreditCardId.</param>
        /// <param name="cardType">Initial value of CardType.</param>
        /// <param name="cardNumber">Initial value of CardNumber.</param>
        /// <param name="expMonth">Initial value of ExpMonth.</param>
        /// <param name="expYear">Initial value of ExpYear.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static CreditCard CreateCreditCard(int creditCardId, string cardType, string cardNumber, byte expMonth, short expYear, global::System.DateTime modifiedDate)
        {
            CreditCard creditCard = new CreditCard();
            creditCard.CreditCardId = creditCardId;
            creditCard.CardType = cardType;
            creditCard.CardNumber = cardNumber;
            creditCard.ExpMonth = expMonth;
            creditCard.ExpYear = expYear;
            creditCard.ModifiedDate = modifiedDate;
            return creditCard;
        }
        /// <summary>
        /// There are no comments for property CreditCardId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CreditCardId
        {
            get
            {
                return this._CreditCardId;
            }
            set
            {
                this.OnCreditCardIdChanging(value);
                this.ReportPropertyChanging("CreditCardId");
                this._CreditCardId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CreditCardId");
                this.OnCreditCardIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CreditCardId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardIdChanged();
        /// <summary>
        /// Credit card name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CardType
        {
            get
            {
                return this._CardType;
            }
            set
            {
                this.OnCardTypeChanging(value);
                this.ReportPropertyChanging("CardType");
                this._CardType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CardType");
                this.OnCardTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CardType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCardTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCardTypeChanged();
        /// <summary>
        /// Credit card number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CardNumber
        {
            get
            {
                return this._CardNumber;
            }
            set
            {
                this.OnCardNumberChanging(value);
                this.ReportPropertyChanging("CardNumber");
                this._CardNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CardNumber");
                this.OnCardNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CardNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCardNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCardNumberChanged();
        /// <summary>
        /// Credit card expiration month.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte ExpMonth
        {
            get
            {
                return this._ExpMonth;
            }
            set
            {
                this.OnExpMonthChanging(value);
                this.ReportPropertyChanging("ExpMonth");
                this._ExpMonth = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ExpMonth");
                this.OnExpMonthChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _ExpMonth;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnExpMonthChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnExpMonthChanged();
        /// <summary>
        /// Credit card expiration year.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short ExpYear
        {
            get
            {
                return this._ExpYear;
            }
            set
            {
                this.OnExpYearChanging(value);
                this.ReportPropertyChanging("ExpYear");
                this._ExpYear = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ExpYear");
                this.OnExpYearChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _ExpYear;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnExpYearChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnExpYearChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Lookup table containing the languages in which some AdventureWorks data is stored.
    /// </summary>
    /// <KeyProperties>
    /// CultureId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Culture")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Culture : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Culture object.
        /// </summary>
        /// <param name="cultureId">Initial value of CultureId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Culture CreateCulture(string cultureId, string name, global::System.DateTime modifiedDate)
        {
            Culture culture = new Culture();
            culture.CultureId = cultureId;
            culture.Name = name;
            culture.ModifiedDate = modifiedDate;
            return culture;
        }
        /// <summary>
        /// There are no comments for property CultureId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CultureId
        {
            get
            {
                return this._CultureId;
            }
            set
            {
                this.OnCultureIdChanging(value);
                this.ReportPropertyChanging("CultureId");
                this._CultureId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CultureId");
                this.OnCultureIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CultureId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCultureIdChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCultureIdChanged();
        /// <summary>
        /// Culture description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Lookup table containing standard ISO currencies.
    /// </summary>
    /// <KeyProperties>
    /// CurrencyCode
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Currency")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Currency : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Currency object.
        /// </summary>
        /// <param name="currencyCode">Initial value of CurrencyCode.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Currency CreateCurrency(string currencyCode, string name, global::System.DateTime modifiedDate)
        {
            Currency currency = new Currency();
            currency.CurrencyCode = currencyCode;
            currency.Name = name;
            currency.ModifiedDate = modifiedDate;
            return currency;
        }
        /// <summary>
        /// There are no comments for property CurrencyCode in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CurrencyCode
        {
            get
            {
                return this._CurrencyCode;
            }
            set
            {
                this.OnCurrencyCodeChanging(value);
                this.ReportPropertyChanging("CurrencyCode");
                this._CurrencyCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CurrencyCode");
                this.OnCurrencyCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CurrencyCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyCodeChanged();
        /// <summary>
        /// Currency name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Currency exchange rates.
    /// </summary>
    /// <KeyProperties>
    /// CurrencyRateId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="CurrencyRate")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class CurrencyRate : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new CurrencyRate object.
        /// </summary>
        /// <param name="currencyRateId">Initial value of CurrencyRateId.</param>
        /// <param name="currencyRateDate">Initial value of CurrencyRateDate.</param>
        /// <param name="averageRate">Initial value of AverageRate.</param>
        /// <param name="endOfDayRate">Initial value of EndOfDayRate.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static CurrencyRate CreateCurrencyRate(int currencyRateId, global::System.DateTime currencyRateDate, decimal averageRate, decimal endOfDayRate, global::System.DateTime modifiedDate)
        {
            CurrencyRate currencyRate = new CurrencyRate();
            currencyRate.CurrencyRateId = currencyRateId;
            currencyRate.CurrencyRateDate = currencyRateDate;
            currencyRate.AverageRate = averageRate;
            currencyRate.EndOfDayRate = endOfDayRate;
            currencyRate.ModifiedDate = modifiedDate;
            return currencyRate;
        }
        /// <summary>
        /// There are no comments for property CurrencyRateId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CurrencyRateId
        {
            get
            {
                return this._CurrencyRateId;
            }
            set
            {
                this.OnCurrencyRateIdChanging(value);
                this.ReportPropertyChanging("CurrencyRateId");
                this._CurrencyRateId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CurrencyRateId");
                this.OnCurrencyRateIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CurrencyRateId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyRateIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyRateIdChanged();
        /// <summary>
        /// Date and time the exchange rate was obtained.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime CurrencyRateDate
        {
            get
            {
                return this._CurrencyRateDate;
            }
            set
            {
                this.OnCurrencyRateDateChanging(value);
                this.ReportPropertyChanging("CurrencyRateDate");
                this._CurrencyRateDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CurrencyRateDate");
                this.OnCurrencyRateDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _CurrencyRateDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyRateDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrencyRateDateChanged();
        /// <summary>
        /// Average exchange rate for the day.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal AverageRate
        {
            get
            {
                return this._AverageRate;
            }
            set
            {
                this.OnAverageRateChanging(value);
                this.ReportPropertyChanging("AverageRate");
                this._AverageRate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AverageRate");
                this.OnAverageRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _AverageRate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAverageRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAverageRateChanged();
        /// <summary>
        /// Final exchange rate for the day.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal EndOfDayRate
        {
            get
            {
                return this._EndOfDayRate;
            }
            set
            {
                this.OnEndOfDayRateChanging(value);
                this.ReportPropertyChanging("EndOfDayRate");
                this._EndOfDayRate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndOfDayRate");
                this.OnEndOfDayRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _EndOfDayRate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndOfDayRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndOfDayRateChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for FromCurrencyCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CurrencyRate_FromCurrencyCode", "Currency")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Currency FromCurrencyCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_FromCurrencyCode", "Currency").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_FromCurrencyCode", "Currency").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for FromCurrencyCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Currency> FromCurrencyCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_FromCurrencyCode", "Currency");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Currency>("AdvWorksModel.CurrencyRate_FromCurrencyCode", "Currency", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ToCurrencyCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CurrencyRate_ToCurrencyCode", "Currency")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Currency ToCurrencyCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_ToCurrencyCode", "Currency").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_ToCurrencyCode", "Currency").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ToCurrencyCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Currency> ToCurrencyCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Currency>("AdvWorksModel.CurrencyRate_ToCurrencyCode", "Currency");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Currency>("AdvWorksModel.CurrencyRate_ToCurrencyCode", "Currency", value);
                }
            }
        }
    }
    /// <summary>
    /// Current customer information. Also see the Individual and Store tables.
    /// </summary>
    /// <KeyProperties>
    /// CustomerId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Customer")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Customer : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Customer object.
        /// </summary>
        /// <param name="customerId">Initial value of CustomerId.</param>
        /// <param name="accountNumber">Initial value of AccountNumber.</param>
        /// <param name="customerType">Initial value of CustomerType.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Customer CreateCustomer(int customerId, string accountNumber, string customerType, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Customer customer = new Customer();
            customer.CustomerId = customerId;
            customer.AccountNumber = accountNumber;
            customer.CustomerType = customerType;
            customer.Rowguid = rowguid;
            customer.ModifiedDate = modifiedDate;
            return customer;
        }
        /// <summary>
        /// There are no comments for property CustomerId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                this.OnCustomerIdChanging(value);
                this.ReportPropertyChanging("CustomerId");
                this._CustomerId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerId");
                this.OnCustomerIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CustomerId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanged();
        /// <summary>
        /// Unique number identifying the customer assigned by the accounting system.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AccountNumber
        {
            get
            {
                return this._AccountNumber;
            }
            set
            {
                this.OnAccountNumberChanging(value);
                this.ReportPropertyChanging("AccountNumber");
                this._AccountNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("AccountNumber");
                this.OnAccountNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AccountNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanged();
        /// <summary>
        /// Customer type: I = Individual, S = Store
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CustomerType
        {
            get
            {
                return this._CustomerType;
            }
            set
            {
                this.OnCustomerTypeChanging(value);
                this.ReportPropertyChanging("CustomerType");
                this._CustomerType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CustomerType");
                this.OnCustomerTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CustomerType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerTypeChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Customer_TerritoryId", "SalesTerritory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesTerritory TerritoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.Customer_TerritoryId", "SalesTerritory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.Customer_TerritoryId", "SalesTerritory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesTerritory> TerritoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.Customer_TerritoryId", "SalesTerritory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesTerritory>("AdvWorksModel.Customer_TerritoryId", "SalesTerritory", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping customers to their address(es).
    /// </summary>
    /// <KeyProperties>
    /// CustomerId
    /// AddressId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="CustomerAddress")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class CustomerAddress : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new CustomerAddress object.
        /// </summary>
        /// <param name="customerId">Initial value of CustomerId.</param>
        /// <param name="addressId">Initial value of AddressId.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static CustomerAddress CreateCustomerAddress(int customerId, int addressId, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            CustomerAddress customerAddress = new CustomerAddress();
            customerAddress.CustomerId = customerId;
            customerAddress.AddressId = addressId;
            customerAddress.Rowguid = rowguid;
            customerAddress.ModifiedDate = modifiedDate;
            return customerAddress;
        }
        /// <summary>
        /// Primary key. Foreign key to Customer.CustomerID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                this.OnCustomerIdChanging(value);
                this.ReportPropertyChanging("CustomerId");
                this._CustomerId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerId");
                this.OnCustomerIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CustomerId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanged();
        /// <summary>
        /// Primary key. Foreign key to Address.AddressID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int AddressId
        {
            get
            {
                return this._AddressId;
            }
            set
            {
                this.OnAddressIdChanging(value);
                this.ReportPropertyChanging("AddressId");
                this._AddressId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AddressId");
                this.OnAddressIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _AddressId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for AddressTypeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CustomerAddress_AddressTypeId", "AddressType")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public AddressType AddressTypeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.CustomerAddress_AddressTypeId", "AddressType").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.CustomerAddress_AddressTypeId", "AddressType").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for AddressTypeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<AddressType> AddressTypeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.CustomerAddress_AddressTypeId", "AddressType");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<AddressType>("AdvWorksModel.CustomerAddress_AddressTypeId", "AddressType", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CustomerAddress_CustomerId", "Customer")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Customer CustomerIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.CustomerAddress_CustomerId", "Customer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.CustomerAddress_CustomerId", "Customer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Customer> CustomerIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.CustomerAddress_CustomerId", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Customer>("AdvWorksModel.CustomerAddress_CustomerId", "Customer", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for AddressIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "CustomerAddress_AddressId", "Address")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Address AddressIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.CustomerAddress_AddressId", "Address").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.CustomerAddress_AddressId", "Address").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for AddressIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Address> AddressIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.CustomerAddress_AddressId", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Address>("AdvWorksModel.CustomerAddress_AddressId", "Address", value);
                }
            }
        }
    }
    /// <summary>
    /// Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.
    /// </summary>
    /// <KeyProperties>
    /// DatabaseLogId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="DatabaseLog")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class DatabaseLog : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new DatabaseLog object.
        /// </summary>
        /// <param name="databaseLogId">Initial value of DatabaseLogId.</param>
        /// <param name="postTime">Initial value of PostTime.</param>
        /// <param name="databaseUser">Initial value of DatabaseUser.</param>
        /// <param name="event">Initial value of Event.</param>
        /// <param name="tsql">Initial value of Tsql.</param>
        /// <param name="xmlEvent">Initial value of XmlEvent.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static DatabaseLog CreateDatabaseLog(int databaseLogId, global::System.DateTime postTime, string databaseUser, string @event, string tsql, string xmlEvent)
        {
            DatabaseLog databaseLog = new DatabaseLog();
            databaseLog.DatabaseLogId = databaseLogId;
            databaseLog.PostTime = postTime;
            databaseLog.DatabaseUser = databaseUser;
            databaseLog.Event = @event;
            databaseLog.Tsql = tsql;
            databaseLog.XmlEvent = xmlEvent;
            return databaseLog;
        }
        /// <summary>
        /// There are no comments for property DatabaseLogId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int DatabaseLogId
        {
            get
            {
                return this._DatabaseLogId;
            }
            set
            {
                this.OnDatabaseLogIdChanging(value);
                this.ReportPropertyChanging("DatabaseLogId");
                this._DatabaseLogId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DatabaseLogId");
                this.OnDatabaseLogIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _DatabaseLogId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseLogIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseLogIdChanged();
        /// <summary>
        /// The date and time the DDL change occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime PostTime
        {
            get
            {
                return this._PostTime;
            }
            set
            {
                this.OnPostTimeChanging(value);
                this.ReportPropertyChanging("PostTime");
                this._PostTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PostTime");
                this.OnPostTimeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _PostTime;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPostTimeChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPostTimeChanged();
        /// <summary>
        /// The user who implemented the DDL change.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string DatabaseUser
        {
            get
            {
                return this._DatabaseUser;
            }
            set
            {
                this.OnDatabaseUserChanging(value);
                this.ReportPropertyChanging("DatabaseUser");
                this._DatabaseUser = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("DatabaseUser");
                this.OnDatabaseUserChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _DatabaseUser;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseUserChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDatabaseUserChanged();
        /// <summary>
        /// The type of DDL statement that was executed.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Event
        {
            get
            {
                return this._Event;
            }
            set
            {
                this.OnEventChanging(value);
                this.ReportPropertyChanging("Event");
                this._Event = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Event");
                this.OnEventChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Event;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEventChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEventChanged();
        /// <summary>
        /// The schema to which the changed object belongs.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Schema
        {
            get
            {
                return this._Schema;
            }
            set
            {
                this.OnSchemaChanging(value);
                this.ReportPropertyChanging("Schema");
                this._Schema = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Schema");
                this.OnSchemaChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Schema;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSchemaChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSchemaChanged();
        /// <summary>
        /// The object that was changed by the DDL statment.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Object
        {
            get
            {
                return this._Object;
            }
            set
            {
                this.OnObjectChanging(value);
                this.ReportPropertyChanging("Object");
                this._Object = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Object");
                this.OnObjectChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Object;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnObjectChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnObjectChanged();
        /// <summary>
        /// The exact Transact-SQL statement that was executed.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Tsql
        {
            get
            {
                return this._Tsql;
            }
            set
            {
                this.OnTsqlChanging(value);
                this.ReportPropertyChanging("Tsql");
                this._Tsql = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Tsql");
                this.OnTsqlChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Tsql;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTsqlChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTsqlChanged();
        /// <summary>
        /// The raw XML data generated by database trigger.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string XmlEvent
        {
            get
            {
                return this._XmlEvent;
            }
            set
            {
                this.OnXmlEventChanging(value);
                this.ReportPropertyChanging("XmlEvent");
                this._XmlEvent = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("XmlEvent");
                this.OnXmlEventChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _XmlEvent;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnXmlEventChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnXmlEventChanged();
    }
    /// <summary>
    /// Lookup table containing the departments within the Adventure Works Cycles company.
    /// </summary>
    /// <KeyProperties>
    /// DepartmentId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Department")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Department : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Department object.
        /// </summary>
        /// <param name="departmentId">Initial value of DepartmentId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="groupName">Initial value of GroupName.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Department CreateDepartment(short departmentId, string name, string groupName, global::System.DateTime modifiedDate)
        {
            Department department = new Department();
            department.DepartmentId = departmentId;
            department.Name = name;
            department.GroupName = groupName;
            department.ModifiedDate = modifiedDate;
            return department;
        }
        /// <summary>
        /// There are no comments for property DepartmentId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short DepartmentId
        {
            get
            {
                return this._DepartmentId;
            }
            set
            {
                this.OnDepartmentIdChanging(value);
                this.ReportPropertyChanging("DepartmentId");
                this._DepartmentId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DepartmentId");
                this.OnDepartmentIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _DepartmentId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDepartmentIdChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDepartmentIdChanged();
        /// <summary>
        /// Name of the department.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Name of the group to which the department belongs.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string GroupName
        {
            get
            {
                return this._GroupName;
            }
            set
            {
                this.OnGroupNameChanging(value);
                this.ReportPropertyChanging("GroupName");
                this._GroupName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("GroupName");
                this.OnGroupNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _GroupName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGroupNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGroupNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Product maintenance documents.
    /// </summary>
    /// <KeyProperties>
    /// DocumentId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Document")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Document : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Document object.
        /// </summary>
        /// <param name="documentId">Initial value of DocumentId.</param>
        /// <param name="title">Initial value of Title.</param>
        /// <param name="fileName">Initial value of FileName.</param>
        /// <param name="fileExtension">Initial value of FileExtension.</param>
        /// <param name="revision">Initial value of Revision.</param>
        /// <param name="changeNumber">Initial value of ChangeNumber.</param>
        /// <param name="status">Initial value of Status.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Document CreateDocument(int documentId, string title, string fileName, string fileExtension, string revision, int changeNumber, byte status, global::System.DateTime modifiedDate)
        {
            Document document = new Document();
            document.DocumentId = documentId;
            document.Title = title;
            document.FileName = fileName;
            document.FileExtension = fileExtension;
            document.Revision = revision;
            document.ChangeNumber = changeNumber;
            document.Status = status;
            document.ModifiedDate = modifiedDate;
            return document;
        }
        /// <summary>
        /// There are no comments for property DocumentId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int DocumentId
        {
            get
            {
                return this._DocumentId;
            }
            set
            {
                this.OnDocumentIdChanging(value);
                this.ReportPropertyChanging("DocumentId");
                this._DocumentId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DocumentId");
                this.OnDocumentIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _DocumentId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentIdChanged();
        /// <summary>
        /// Title of the document.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Title
        {
            get
            {
                return this._Title;
            }
            set
            {
                this.OnTitleChanging(value);
                this.ReportPropertyChanging("Title");
                this._Title = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Title");
                this.OnTitleChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Title;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanged();
        /// <summary>
        /// Directory path and file name of the document
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string FileName
        {
            get
            {
                return this._FileName;
            }
            set
            {
                this.OnFileNameChanging(value);
                this.ReportPropertyChanging("FileName");
                this._FileName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("FileName");
                this.OnFileNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _FileName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFileNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFileNameChanged();
        /// <summary>
        /// File extension indicating the document type. For example, .doc or .txt.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string FileExtension
        {
            get
            {
                return this._FileExtension;
            }
            set
            {
                this.OnFileExtensionChanging(value);
                this.ReportPropertyChanging("FileExtension");
                this._FileExtension = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("FileExtension");
                this.OnFileExtensionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _FileExtension;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFileExtensionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFileExtensionChanged();
        /// <summary>
        /// Revision number of the document.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Revision
        {
            get
            {
                return this._Revision;
            }
            set
            {
                this.OnRevisionChanging(value);
                this.ReportPropertyChanging("Revision");
                this._Revision = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Revision");
                this.OnRevisionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Revision;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionChanged();
        /// <summary>
        /// Engineering change approval number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ChangeNumber
        {
            get
            {
                return this._ChangeNumber;
            }
            set
            {
                this.OnChangeNumberChanging(value);
                this.ReportPropertyChanging("ChangeNumber");
                this._ChangeNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ChangeNumber");
                this.OnChangeNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ChangeNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnChangeNumberChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnChangeNumberChanged();
        /// <summary>
        /// 1 = Pending approval, 2 = Approved, 3 = Obsolete
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte Status
        {
            get
            {
                return this._Status;
            }
            set
            {
                this.OnStatusChanging(value);
                this.ReportPropertyChanging("Status");
                this._Status = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Status");
                this.OnStatusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _Status;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanged();
        /// <summary>
        /// Document abstract.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string DocumentSummary
        {
            get
            {
                return this._DocumentSummary;
            }
            set
            {
                this.OnDocumentSummaryChanging(value);
                this.ReportPropertyChanging("DocumentSummary");
                this._DocumentSummary = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("DocumentSummary");
                this.OnDocumentSummaryChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _DocumentSummary;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentSummaryChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentSummaryChanged();
        /// <summary>
        /// Complete document.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte[] Document1
        {
            get
            {
                return global::System.Data.Objects.DataClasses.StructuralObject.GetValidValue(this._Document1);
            }
            set
            {
                this.OnDocument1Changing(value);
                this.ReportPropertyChanging("Document1");
                this._Document1 = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Document1");
                this.OnDocument1Changed();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte[] _Document1;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocument1Changing(byte[] value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocument1Changed();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Employee information such as salary, department, and title.
    /// </summary>
    /// <KeyProperties>
    /// EmployeeId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Employee")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Employee : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Employee object.
        /// </summary>
        /// <param name="employeeId">Initial value of EmployeeId.</param>
        /// <param name="nationalIDNumber">Initial value of NationalIDNumber.</param>
        /// <param name="login">Initial value of Login.</param>
        /// <param name="title">Initial value of Title.</param>
        /// <param name="birthDate">Initial value of BirthDate.</param>
        /// <param name="maritalStatus">Initial value of MaritalStatus.</param>
        /// <param name="gender">Initial value of Gender.</param>
        /// <param name="hireDate">Initial value of HireDate.</param>
        /// <param name="salariedFlag">Initial value of SalariedFlag.</param>
        /// <param name="vacationHours">Initial value of VacationHours.</param>
        /// <param name="sickLeaveHours">Initial value of SickLeaveHours.</param>
        /// <param name="currentFlag">Initial value of CurrentFlag.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Employee CreateEmployee(int employeeId, string nationalIDNumber, string login, string title, global::System.DateTime birthDate, string maritalStatus, string gender, global::System.DateTime hireDate, bool salariedFlag, short vacationHours, short sickLeaveHours, bool currentFlag, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Employee employee = new Employee();
            employee.EmployeeId = employeeId;
            employee.NationalIDNumber = nationalIDNumber;
            employee.Login = login;
            employee.Title = title;
            employee.BirthDate = birthDate;
            employee.MaritalStatus = maritalStatus;
            employee.Gender = gender;
            employee.HireDate = hireDate;
            employee.SalariedFlag = salariedFlag;
            employee.VacationHours = vacationHours;
            employee.SickLeaveHours = sickLeaveHours;
            employee.CurrentFlag = currentFlag;
            employee.Rowguid = rowguid;
            employee.ModifiedDate = modifiedDate;
            return employee;
        }
        /// <summary>
        /// There are no comments for property EmployeeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int EmployeeId
        {
            get
            {
                return this._EmployeeId;
            }
            set
            {
                this.OnEmployeeIdChanging(value);
                this.ReportPropertyChanging("EmployeeId");
                this._EmployeeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EmployeeId");
                this.OnEmployeeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _EmployeeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanged();
        /// <summary>
        /// Unique national identification number such as a social security number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string NationalIDNumber
        {
            get
            {
                return this._NationalIDNumber;
            }
            set
            {
                this.OnNationalIDNumberChanging(value);
                this.ReportPropertyChanging("NationalIDNumber");
                this._NationalIDNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("NationalIDNumber");
                this.OnNationalIDNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _NationalIDNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNationalIDNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNationalIDNumberChanged();
        /// <summary>
        /// Network login.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Login
        {
            get
            {
                return this._Login;
            }
            set
            {
                this.OnLoginChanging(value);
                this.ReportPropertyChanging("Login");
                this._Login = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Login");
                this.OnLoginChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Login;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLoginChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLoginChanged();
        /// <summary>
        /// Work title such as Buyer or Sales Representative.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Title
        {
            get
            {
                return this._Title;
            }
            set
            {
                this.OnTitleChanging(value);
                this.ReportPropertyChanging("Title");
                this._Title = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Title");
                this.OnTitleChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Title;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTitleChanged();
        /// <summary>
        /// Date of birth.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime BirthDate
        {
            get
            {
                return this._BirthDate;
            }
            set
            {
                this.OnBirthDateChanging(value);
                this.ReportPropertyChanging("BirthDate");
                this._BirthDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("BirthDate");
                this.OnBirthDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _BirthDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBirthDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBirthDateChanged();
        /// <summary>
        /// M = Married, S = Single
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string MaritalStatus
        {
            get
            {
                return this._MaritalStatus;
            }
            set
            {
                this.OnMaritalStatusChanging(value);
                this.ReportPropertyChanging("MaritalStatus");
                this._MaritalStatus = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("MaritalStatus");
                this.OnMaritalStatusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _MaritalStatus;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaritalStatusChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaritalStatusChanged();
        /// <summary>
        /// M = Male, F = Female
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Gender
        {
            get
            {
                return this._Gender;
            }
            set
            {
                this.OnGenderChanging(value);
                this.ReportPropertyChanging("Gender");
                this._Gender = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Gender");
                this.OnGenderChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Gender;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGenderChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGenderChanged();
        /// <summary>
        /// Employee hired on this date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime HireDate
        {
            get
            {
                return this._HireDate;
            }
            set
            {
                this.OnHireDateChanging(value);
                this.ReportPropertyChanging("HireDate");
                this._HireDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("HireDate");
                this.OnHireDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _HireDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnHireDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnHireDateChanged();
        /// <summary>
        /// Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool SalariedFlag
        {
            get
            {
                return this._SalariedFlag;
            }
            set
            {
                this.OnSalariedFlagChanging(value);
                this.ReportPropertyChanging("SalariedFlag");
                this._SalariedFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalariedFlag");
                this.OnSalariedFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _SalariedFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalariedFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalariedFlagChanged();
        /// <summary>
        /// Number of available vacation hours.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short VacationHours
        {
            get
            {
                return this._VacationHours;
            }
            set
            {
                this.OnVacationHoursChanging(value);
                this.ReportPropertyChanging("VacationHours");
                this._VacationHours = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VacationHours");
                this.OnVacationHoursChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _VacationHours;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVacationHoursChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVacationHoursChanged();
        /// <summary>
        /// Number of available sick leave hours.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short SickLeaveHours
        {
            get
            {
                return this._SickLeaveHours;
            }
            set
            {
                this.OnSickLeaveHoursChanging(value);
                this.ReportPropertyChanging("SickLeaveHours");
                this._SickLeaveHours = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SickLeaveHours");
                this.OnSickLeaveHoursChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _SickLeaveHours;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSickLeaveHoursChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSickLeaveHoursChanged();
        /// <summary>
        /// 0 = Inactive, 1 = Active
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool CurrentFlag
        {
            get
            {
                return this._CurrentFlag;
            }
            set
            {
                this.OnCurrentFlagChanging(value);
                this.ReportPropertyChanging("CurrentFlag");
                this._CurrentFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CurrentFlag");
                this.OnCurrentFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _CurrentFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrentFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCurrentFlagChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ContactObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Employee_Contact", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Employee_Contact", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Employee_Contact", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Employee_Contact", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.Employee_Contact", "Contact", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ManagerObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Employee_Manager", "Employee1")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee ManagerObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.Employee_Manager", "Employee1").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.Employee_Manager", "Employee1").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ManagerObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> ManagerObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.Employee_Manager", "Employee1");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.Employee_Manager", "Employee1", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for AddressObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeAddress_Employee", "EmployeeAddress")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<EmployeeAddress> AddressObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<EmployeeAddress>("AdvWorksModel.EmployeeAddress_Employee", "EmployeeAddress");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<EmployeeAddress>("AdvWorksModel.EmployeeAddress_Employee", "EmployeeAddress", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for DepartmentHistoryObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeDepartmentHistory_Employee", "EmployeeDepartmentHistory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<EmployeeDepartmentHistory> DepartmentHistoryObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<EmployeeDepartmentHistory>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "EmployeeDepartmentHistory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<EmployeeDepartmentHistory>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "EmployeeDepartmentHistory", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for PayHistoryObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeePayHistory_Employee", "EmployeePayHistory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<EmployeePayHistory> PayHistoryObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<EmployeePayHistory>("AdvWorksModel.EmployeePayHistory_Employee", "EmployeePayHistory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<EmployeePayHistory>("AdvWorksModel.EmployeePayHistory_Employee", "EmployeePayHistory", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping employees to their address(es).
    /// </summary>
    /// <KeyProperties>
    /// EmployeeId
    /// Address
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="EmployeeAddress")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class EmployeeAddress : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new EmployeeAddress object.
        /// </summary>
        /// <param name="employeeId">Initial value of EmployeeId.</param>
        /// <param name="address">Initial value of Address.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static EmployeeAddress CreateEmployeeAddress(int employeeId, int address, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            EmployeeAddress employeeAddress = new EmployeeAddress();
            employeeAddress.EmployeeId = employeeId;
            employeeAddress.Address = address;
            employeeAddress.Rowguid = rowguid;
            employeeAddress.ModifiedDate = modifiedDate;
            return employeeAddress;
        }
        /// <summary>
        /// There are no comments for property EmployeeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int EmployeeId
        {
            get
            {
                return this._EmployeeId;
            }
            set
            {
                this.OnEmployeeIdChanging(value);
                this.ReportPropertyChanging("EmployeeId");
                this._EmployeeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EmployeeId");
                this.OnEmployeeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _EmployeeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanged();
        /// <summary>
        /// There are no comments for property Address in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                this.OnAddressChanging(value);
                this.ReportPropertyChanging("Address");
                this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Address");
                this.OnAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _Address;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeAddress_Employee", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee EmployeeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeAddress_Employee", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeAddress_Employee", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> EmployeeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeAddress_Employee", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.EmployeeAddress_Employee", "Employee", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for AddressObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeAddress_Address", "Address")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Address AddressObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.EmployeeAddress_Address", "Address").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.EmployeeAddress_Address", "Address").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for AddressObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Address> AddressObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.EmployeeAddress_Address", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Address>("AdvWorksModel.EmployeeAddress_Address", "Address", value);
                }
            }
        }
    }
    /// <summary>
    /// Employee department transfers.
    /// </summary>
    /// <KeyProperties>
    /// EmployeeId
    /// StartDate
    /// DepartmentId
    /// ShiftId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="EmployeeDepartmentHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class EmployeeDepartmentHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new EmployeeDepartmentHistory object.
        /// </summary>
        /// <param name="employeeId">Initial value of EmployeeId.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="departmentId">Initial value of DepartmentId.</param>
        /// <param name="shiftId">Initial value of ShiftId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static EmployeeDepartmentHistory CreateEmployeeDepartmentHistory(int employeeId, global::System.DateTime startDate, short departmentId, byte shiftId, global::System.DateTime modifiedDate)
        {
            EmployeeDepartmentHistory employeeDepartmentHistory = new EmployeeDepartmentHistory();
            employeeDepartmentHistory.EmployeeId = employeeId;
            employeeDepartmentHistory.StartDate = startDate;
            employeeDepartmentHistory.DepartmentId = departmentId;
            employeeDepartmentHistory.ShiftId = shiftId;
            employeeDepartmentHistory.ModifiedDate = modifiedDate;
            return employeeDepartmentHistory;
        }
        /// <summary>
        /// There are no comments for property EmployeeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int EmployeeId
        {
            get
            {
                return this._EmployeeId;
            }
            set
            {
                this.OnEmployeeIdChanging(value);
                this.ReportPropertyChanging("EmployeeId");
                this._EmployeeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EmployeeId");
                this.OnEmployeeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _EmployeeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanged();
        /// <summary>
        /// Date the employee started work in the department.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Department in which the employee worked including currently. Foreign key to Department.DepartmentID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short DepartmentId
        {
            get
            {
                return this._DepartmentId;
            }
            set
            {
                this.OnDepartmentIdChanging(value);
                this.ReportPropertyChanging("DepartmentId");
                this._DepartmentId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DepartmentId");
                this.OnDepartmentIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _DepartmentId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDepartmentIdChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDepartmentIdChanged();
        /// <summary>
        /// Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte ShiftId
        {
            get
            {
                return this._ShiftId;
            }
            set
            {
                this.OnShiftIdChanging(value);
                this.ReportPropertyChanging("ShiftId");
                this._ShiftId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShiftId");
                this.OnShiftIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _ShiftId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShiftIdChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShiftIdChanged();
        /// <summary>
        /// Date the employee left the department. NULL = Current department.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeDepartmentHistory_Employee", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee EmployeeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> EmployeeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.EmployeeDepartmentHistory_Employee", "Employee", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for DepartmentIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeDepartmentHistory_DepartmentId", "Department")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Department DepartmentIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Department>("AdvWorksModel.EmployeeDepartmentHistory_DepartmentId", "Department").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Department>("AdvWorksModel.EmployeeDepartmentHistory_DepartmentId", "Department").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for DepartmentIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Department> DepartmentIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Department>("AdvWorksModel.EmployeeDepartmentHistory_DepartmentId", "Department");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Department>("AdvWorksModel.EmployeeDepartmentHistory_DepartmentId", "Department", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ShiftIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeeDepartmentHistory_ShiftId", "Shift")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Shift ShiftIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Shift>("AdvWorksModel.EmployeeDepartmentHistory_ShiftId", "Shift").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Shift>("AdvWorksModel.EmployeeDepartmentHistory_ShiftId", "Shift").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ShiftIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Shift> ShiftIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Shift>("AdvWorksModel.EmployeeDepartmentHistory_ShiftId", "Shift");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Shift>("AdvWorksModel.EmployeeDepartmentHistory_ShiftId", "Shift", value);
                }
            }
        }
    }
    /// <summary>
    /// Employee pay history.
    /// </summary>
    /// <KeyProperties>
    /// EmployeeId
    /// RateChangeDate
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="EmployeePayHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class EmployeePayHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new EmployeePayHistory object.
        /// </summary>
        /// <param name="employeeId">Initial value of EmployeeId.</param>
        /// <param name="rateChangeDate">Initial value of RateChangeDate.</param>
        /// <param name="rate">Initial value of Rate.</param>
        /// <param name="payFrequency">Initial value of PayFrequency.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static EmployeePayHistory CreateEmployeePayHistory(int employeeId, global::System.DateTime rateChangeDate, decimal rate, byte payFrequency, global::System.DateTime modifiedDate)
        {
            EmployeePayHistory employeePayHistory = new EmployeePayHistory();
            employeePayHistory.EmployeeId = employeeId;
            employeePayHistory.RateChangeDate = rateChangeDate;
            employeePayHistory.Rate = rate;
            employeePayHistory.PayFrequency = payFrequency;
            employeePayHistory.ModifiedDate = modifiedDate;
            return employeePayHistory;
        }
        /// <summary>
        /// There are no comments for property EmployeeId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int EmployeeId
        {
            get
            {
                return this._EmployeeId;
            }
            set
            {
                this.OnEmployeeIdChanging(value);
                this.ReportPropertyChanging("EmployeeId");
                this._EmployeeId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EmployeeId");
                this.OnEmployeeIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _EmployeeId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmployeeIdChanged();
        /// <summary>
        /// Date the change in pay is effective
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime RateChangeDate
        {
            get
            {
                return this._RateChangeDate;
            }
            set
            {
                this.OnRateChangeDateChanging(value);
                this.ReportPropertyChanging("RateChangeDate");
                this._RateChangeDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("RateChangeDate");
                this.OnRateChangeDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _RateChangeDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRateChangeDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRateChangeDateChanged();
        /// <summary>
        /// Salary hourly rate.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal Rate
        {
            get
            {
                return this._Rate;
            }
            set
            {
                this.OnRateChanging(value);
                this.ReportPropertyChanging("Rate");
                this._Rate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rate");
                this.OnRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _Rate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRateChanged();
        /// <summary>
        /// 1 = Salary received monthly, 2 = Salary received biweekly
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte PayFrequency
        {
            get
            {
                return this._PayFrequency;
            }
            set
            {
                this.OnPayFrequencyChanging(value);
                this.ReportPropertyChanging("PayFrequency");
                this._PayFrequency = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PayFrequency");
                this.OnPayFrequencyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _PayFrequency;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPayFrequencyChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPayFrequencyChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "EmployeePayHistory_Employee", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee EmployeeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeePayHistory_Employee", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeePayHistory_Employee", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for EmployeeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> EmployeeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.EmployeePayHistory_Employee", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.EmployeePayHistory_Employee", "Employee", value);
                }
            }
        }
    }
    /// <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>
    /// <KeyProperties>
    /// ErrorLogId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ErrorLog")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ErrorLog : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ErrorLog object.
        /// </summary>
        /// <param name="errorLogId">Initial value of ErrorLogId.</param>
        /// <param name="errorTime">Initial value of ErrorTime.</param>
        /// <param name="userName">Initial value of UserName.</param>
        /// <param name="errorNumber">Initial value of ErrorNumber.</param>
        /// <param name="errorMessage">Initial value of ErrorMessage.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ErrorLog CreateErrorLog(int errorLogId, global::System.DateTime errorTime, string userName, int errorNumber, string errorMessage)
        {
            ErrorLog errorLog = new ErrorLog();
            errorLog.ErrorLogId = errorLogId;
            errorLog.ErrorTime = errorTime;
            errorLog.UserName = userName;
            errorLog.ErrorNumber = errorNumber;
            errorLog.ErrorMessage = errorMessage;
            return errorLog;
        }
        /// <summary>
        /// There are no comments for property ErrorLogId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ErrorLogId
        {
            get
            {
                return this._ErrorLogId;
            }
            set
            {
                this.OnErrorLogIdChanging(value);
                this.ReportPropertyChanging("ErrorLogId");
                this._ErrorLogId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorLogId");
                this.OnErrorLogIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ErrorLogId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorLogIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorLogIdChanged();
        /// <summary>
        /// The date and time at which the error occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ErrorTime
        {
            get
            {
                return this._ErrorTime;
            }
            set
            {
                this.OnErrorTimeChanging(value);
                this.ReportPropertyChanging("ErrorTime");
                this._ErrorTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorTime");
                this.OnErrorTimeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ErrorTime;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorTimeChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorTimeChanged();
        /// <summary>
        /// The user who executed the batch in which the error occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string UserName
        {
            get
            {
                return this._UserName;
            }
            set
            {
                this.OnUserNameChanging(value);
                this.ReportPropertyChanging("UserName");
                this._UserName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("UserName");
                this.OnUserNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _UserName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUserNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUserNameChanged();
        /// <summary>
        /// The error number of the error that occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ErrorNumber
        {
            get
            {
                return this._ErrorNumber;
            }
            set
            {
                this.OnErrorNumberChanging(value);
                this.ReportPropertyChanging("ErrorNumber");
                this._ErrorNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorNumber");
                this.OnErrorNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ErrorNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorNumberChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorNumberChanged();
        /// <summary>
        /// The severity of the error that occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<int> ErrorSeverity
        {
            get
            {
                return this._ErrorSeverity;
            }
            set
            {
                this.OnErrorSeverityChanging(value);
                this.ReportPropertyChanging("ErrorSeverity");
                this._ErrorSeverity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorSeverity");
                this.OnErrorSeverityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<int> _ErrorSeverity;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorSeverityChanging(global::System.Nullable<int> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorSeverityChanged();
        /// <summary>
        /// The state number of the error that occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<int> ErrorState
        {
            get
            {
                return this._ErrorState;
            }
            set
            {
                this.OnErrorStateChanging(value);
                this.ReportPropertyChanging("ErrorState");
                this._ErrorState = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorState");
                this.OnErrorStateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<int> _ErrorState;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorStateChanging(global::System.Nullable<int> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorStateChanged();
        /// <summary>
        /// The name of the stored procedure or trigger where the error occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ErrorProcedure
        {
            get
            {
                return this._ErrorProcedure;
            }
            set
            {
                this.OnErrorProcedureChanging(value);
                this.ReportPropertyChanging("ErrorProcedure");
                this._ErrorProcedure = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ErrorProcedure");
                this.OnErrorProcedureChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ErrorProcedure;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorProcedureChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorProcedureChanged();
        /// <summary>
        /// The line number at which the error occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<int> ErrorLine
        {
            get
            {
                return this._ErrorLine;
            }
            set
            {
                this.OnErrorLineChanging(value);
                this.ReportPropertyChanging("ErrorLine");
                this._ErrorLine = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ErrorLine");
                this.OnErrorLineChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<int> _ErrorLine;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorLineChanging(global::System.Nullable<int> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorLineChanged();
        /// <summary>
        /// The message text of the error that occurred.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ErrorMessage
        {
            get
            {
                return this._ErrorMessage;
            }
            set
            {
                this.OnErrorMessageChanging(value);
                this.ReportPropertyChanging("ErrorMessage");
                this._ErrorMessage = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ErrorMessage");
                this.OnErrorMessageChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ErrorMessage;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorMessageChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnErrorMessageChanged();
    }
    /// <summary>
    /// Bicycle assembly diagrams.
    /// </summary>
    /// <KeyProperties>
    /// IllustrationId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Illustration")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Illustration : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Illustration object.
        /// </summary>
        /// <param name="illustrationId">Initial value of IllustrationId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Illustration CreateIllustration(int illustrationId, global::System.DateTime modifiedDate)
        {
            Illustration illustration = new Illustration();
            illustration.IllustrationId = illustrationId;
            illustration.ModifiedDate = modifiedDate;
            return illustration;
        }
        /// <summary>
        /// There are no comments for property IllustrationId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int IllustrationId
        {
            get
            {
                return this._IllustrationId;
            }
            set
            {
                this.OnIllustrationIdChanging(value);
                this.ReportPropertyChanging("IllustrationId");
                this._IllustrationId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("IllustrationId");
                this.OnIllustrationIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _IllustrationId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIllustrationIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIllustrationIdChanged();
        /// <summary>
        /// Illustrations used in manufacturing instructions. Stored as XML.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Diagram
        {
            get
            {
                return this._Diagram;
            }
            set
            {
                this.OnDiagramChanging(value);
                this.ReportPropertyChanging("Diagram");
                this._Diagram = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Diagram");
                this.OnDiagramChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Diagram;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiagramChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiagramChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Demographic data about customers that purchase Adventure Works products online.
    /// </summary>
    /// <KeyProperties>
    /// CustomerId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Individual")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Individual : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Individual object.
        /// </summary>
        /// <param name="customerId">Initial value of CustomerId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Individual CreateIndividual(int customerId, global::System.DateTime modifiedDate)
        {
            Individual individual = new Individual();
            individual.CustomerId = customerId;
            individual.ModifiedDate = modifiedDate;
            return individual;
        }
        /// <summary>
        /// There are no comments for property CustomerId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                this.OnCustomerIdChanging(value);
                this.ReportPropertyChanging("CustomerId");
                this._CustomerId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerId");
                this.OnCustomerIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CustomerId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanged();
        /// <summary>
        /// Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Demographics
        {
            get
            {
                return this._Demographics;
            }
            set
            {
                this.OnDemographicsChanging(value);
                this.ReportPropertyChanging("Demographics");
                this._Demographics = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Demographics");
                this.OnDemographicsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Demographics;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDemographicsChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDemographicsChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Individual_CustomerId", "Customer")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Customer CustomerIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Individual_CustomerId", "Customer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Individual_CustomerId", "Customer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Customer> CustomerIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Individual_CustomerId", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Customer>("AdvWorksModel.Individual_CustomerId", "Customer", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Individual_ContactId", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Individual_ContactId", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Individual_ContactId", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.Individual_ContactId", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.Individual_ContactId", "Contact", value);
                }
            }
        }
    }
    /// <summary>
    /// Résumés submitted to Human Resources by job applicants.
    /// </summary>
    /// <KeyProperties>
    /// JobCandidateId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="JobCandidate")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class JobCandidate : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new JobCandidate object.
        /// </summary>
        /// <param name="jobCandidateId">Initial value of JobCandidateId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static JobCandidate CreateJobCandidate(int jobCandidateId, global::System.DateTime modifiedDate)
        {
            JobCandidate jobCandidate = new JobCandidate();
            jobCandidate.JobCandidateId = jobCandidateId;
            jobCandidate.ModifiedDate = modifiedDate;
            return jobCandidate;
        }
        /// <summary>
        /// There are no comments for property JobCandidateId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int JobCandidateId
        {
            get
            {
                return this._JobCandidateId;
            }
            set
            {
                this.OnJobCandidateIdChanging(value);
                this.ReportPropertyChanging("JobCandidateId");
                this._JobCandidateId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("JobCandidateId");
                this.OnJobCandidateIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _JobCandidateId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnJobCandidateIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnJobCandidateIdChanged();
        /// <summary>
        /// Résumé in XML format.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Resume
        {
            get
            {
                return this._Resume;
            }
            set
            {
                this.OnResumeChanging(value);
                this.ReportPropertyChanging("Resume");
                this._Resume = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Resume");
                this.OnResumeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Resume;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnResumeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnResumeChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for EmployeeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "JobCandidate_EmployeeId", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee EmployeeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.JobCandidate_EmployeeId", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.JobCandidate_EmployeeId", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for EmployeeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> EmployeeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.JobCandidate_EmployeeId", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.JobCandidate_EmployeeId", "Employee", value);
                }
            }
        }
    }
    /// <summary>
    /// Product inventory and manufacturing locations.
    /// </summary>
    /// <KeyProperties>
    /// LocationId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Location")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Location : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Location object.
        /// </summary>
        /// <param name="locationId">Initial value of LocationId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="costRate">Initial value of CostRate.</param>
        /// <param name="availability">Initial value of Availability.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Location CreateLocation(short locationId, string name, decimal costRate, decimal availability, global::System.DateTime modifiedDate)
        {
            Location location = new Location();
            location.LocationId = locationId;
            location.Name = name;
            location.CostRate = costRate;
            location.Availability = availability;
            location.ModifiedDate = modifiedDate;
            return location;
        }
        /// <summary>
        /// There are no comments for property LocationId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short LocationId
        {
            get
            {
                return this._LocationId;
            }
            set
            {
                this.OnLocationIdChanging(value);
                this.ReportPropertyChanging("LocationId");
                this._LocationId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LocationId");
                this.OnLocationIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _LocationId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLocationIdChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLocationIdChanged();
        /// <summary>
        /// Location description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Standard hourly cost of the manufacturing location.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal CostRate
        {
            get
            {
                return this._CostRate;
            }
            set
            {
                this.OnCostRateChanging(value);
                this.ReportPropertyChanging("CostRate");
                this._CostRate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CostRate");
                this.OnCostRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _CostRate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostRateChanged();
        /// <summary>
        /// Work capacity (in hours) of the manufacturing location.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal Availability
        {
            get
            {
                return this._Availability;
            }
            set
            {
                this.OnAvailabilityChanging(value);
                this.ReportPropertyChanging("Availability");
                this._Availability = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Availability");
                this.OnAvailabilityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _Availability;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAvailabilityChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAvailabilityChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Products sold or used in the manfacturing of sold products.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Product")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Product : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="productNumber">Initial value of ProductNumber.</param>
        /// <param name="makeFlag">Initial value of MakeFlag.</param>
        /// <param name="finishedGoodsFlag">Initial value of FinishedGoodsFlag.</param>
        /// <param name="safetyStockLevel">Initial value of SafetyStockLevel.</param>
        /// <param name="reorderPoint">Initial value of ReorderPoint.</param>
        /// <param name="standardCost">Initial value of StandardCost.</param>
        /// <param name="listPrice">Initial value of ListPrice.</param>
        /// <param name="daysToManufacture">Initial value of DaysToManufacture.</param>
        /// <param name="sellStartDate">Initial value of SellStartDate.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Product CreateProduct(int productId, string name, string productNumber, bool makeFlag, bool finishedGoodsFlag, short safetyStockLevel, short reorderPoint, decimal standardCost, decimal listPrice, int daysToManufacture, global::System.DateTime sellStartDate, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Product product = new Product();
            product.ProductId = productId;
            product.Name = name;
            product.ProductNumber = productNumber;
            product.MakeFlag = makeFlag;
            product.FinishedGoodsFlag = finishedGoodsFlag;
            product.SafetyStockLevel = safetyStockLevel;
            product.ReorderPoint = reorderPoint;
            product.StandardCost = standardCost;
            product.ListPrice = listPrice;
            product.DaysToManufacture = daysToManufacture;
            product.SellStartDate = sellStartDate;
            product.Rowguid = rowguid;
            product.ModifiedDate = modifiedDate;
            return product;
        }
        /// <summary>
        /// There are no comments for property ProductId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Name of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Unique product identification number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ProductNumber
        {
            get
            {
                return this._ProductNumber;
            }
            set
            {
                this.OnProductNumberChanging(value);
                this.ReportPropertyChanging("ProductNumber");
                this._ProductNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ProductNumber");
                this.OnProductNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ProductNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductNumberChanged();
        /// <summary>
        /// 0 = Product is purchased, 1 = Product is manufactured in-house.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool MakeFlag
        {
            get
            {
                return this._MakeFlag;
            }
            set
            {
                this.OnMakeFlagChanging(value);
                this.ReportPropertyChanging("MakeFlag");
                this._MakeFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("MakeFlag");
                this.OnMakeFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _MakeFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMakeFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMakeFlagChanged();
        /// <summary>
        /// 0 = Product is not a salable item. 1 = Product is salable.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool FinishedGoodsFlag
        {
            get
            {
                return this._FinishedGoodsFlag;
            }
            set
            {
                this.OnFinishedGoodsFlagChanging(value);
                this.ReportPropertyChanging("FinishedGoodsFlag");
                this._FinishedGoodsFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("FinishedGoodsFlag");
                this.OnFinishedGoodsFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _FinishedGoodsFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFinishedGoodsFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFinishedGoodsFlagChanged();
        /// <summary>
        /// Product color.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Color
        {
            get
            {
                return this._Color;
            }
            set
            {
                this.OnColorChanging(value);
                this.ReportPropertyChanging("Color");
                this._Color = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Color");
                this.OnColorChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Color;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnColorChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnColorChanged();
        /// <summary>
        /// Minimum inventory quantity.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short SafetyStockLevel
        {
            get
            {
                return this._SafetyStockLevel;
            }
            set
            {
                this.OnSafetyStockLevelChanging(value);
                this.ReportPropertyChanging("SafetyStockLevel");
                this._SafetyStockLevel = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SafetyStockLevel");
                this.OnSafetyStockLevelChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _SafetyStockLevel;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSafetyStockLevelChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSafetyStockLevelChanged();
        /// <summary>
        /// Inventory level that triggers a purchase order or work order.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short ReorderPoint
        {
            get
            {
                return this._ReorderPoint;
            }
            set
            {
                this.OnReorderPointChanging(value);
                this.ReportPropertyChanging("ReorderPoint");
                this._ReorderPoint = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReorderPoint");
                this.OnReorderPointChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _ReorderPoint;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReorderPointChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReorderPointChanged();
        /// <summary>
        /// Standard cost of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal StandardCost
        {
            get
            {
                return this._StandardCost;
            }
            set
            {
                this.OnStandardCostChanging(value);
                this.ReportPropertyChanging("StandardCost");
                this._StandardCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StandardCost");
                this.OnStandardCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _StandardCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardCostChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardCostChanged();
        /// <summary>
        /// Selling price.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ListPrice
        {
            get
            {
                return this._ListPrice;
            }
            set
            {
                this.OnListPriceChanging(value);
                this.ReportPropertyChanging("ListPrice");
                this._ListPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ListPrice");
                this.OnListPriceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ListPrice;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnListPriceChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnListPriceChanged();
        /// <summary>
        /// Product size.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Size
        {
            get
            {
                return this._Size;
            }
            set
            {
                this.OnSizeChanging(value);
                this.ReportPropertyChanging("Size");
                this._Size = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Size");
                this.OnSizeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Size;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSizeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSizeChanged();
        /// <summary>
        /// Product weight.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<decimal> Weight
        {
            get
            {
                return this._Weight;
            }
            set
            {
                this.OnWeightChanging(value);
                this.ReportPropertyChanging("Weight");
                this._Weight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Weight");
                this.OnWeightChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<decimal> _Weight;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWeightChanging(global::System.Nullable<decimal> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWeightChanged();
        /// <summary>
        /// Number of days required to manufacture the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int DaysToManufacture
        {
            get
            {
                return this._DaysToManufacture;
            }
            set
            {
                this.OnDaysToManufactureChanging(value);
                this.ReportPropertyChanging("DaysToManufacture");
                this._DaysToManufacture = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DaysToManufacture");
                this.OnDaysToManufactureChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _DaysToManufacture;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDaysToManufactureChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDaysToManufactureChanged();
        /// <summary>
        /// R = Road, M = Mountain, T = Touring, S = Standard
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ProductLine
        {
            get
            {
                return this._ProductLine;
            }
            set
            {
                this.OnProductLineChanging(value);
                this.ReportPropertyChanging("ProductLine");
                this._ProductLine = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ProductLine");
                this.OnProductLineChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ProductLine;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductLineChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductLineChanged();
        /// <summary>
        /// H = High, M = Medium, L = Low
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Class
        {
            get
            {
                return this._Class;
            }
            set
            {
                this.OnClassChanging(value);
                this.ReportPropertyChanging("Class");
                this._Class = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Class");
                this.OnClassChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Class;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnClassChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnClassChanged();
        /// <summary>
        /// W = Womens, M = Mens, U = Universal
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Style
        {
            get
            {
                return this._Style;
            }
            set
            {
                this.OnStyleChanging(value);
                this.ReportPropertyChanging("Style");
                this._Style = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Style");
                this.OnStyleChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Style;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStyleChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStyleChanged();
        /// <summary>
        /// Date the product was available for sale.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime SellStartDate
        {
            get
            {
                return this._SellStartDate;
            }
            set
            {
                this.OnSellStartDateChanging(value);
                this.ReportPropertyChanging("SellStartDate");
                this._SellStartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SellStartDate");
                this.OnSellStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _SellStartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSellStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSellStartDateChanged();
        /// <summary>
        /// Date the product was no longer available for sale.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> SellEndDate
        {
            get
            {
                return this._SellEndDate;
            }
            set
            {
                this.OnSellEndDateChanging(value);
                this.ReportPropertyChanging("SellEndDate");
                this._SellEndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SellEndDate");
                this.OnSellEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _SellEndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSellEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSellEndDateChanged();
        /// <summary>
        /// Date the product was discontinued.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> DiscontinuedDate
        {
            get
            {
                return this._DiscontinuedDate;
            }
            set
            {
                this.OnDiscontinuedDateChanging(value);
                this.ReportPropertyChanging("DiscontinuedDate");
                this._DiscontinuedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DiscontinuedDate");
                this.OnDiscontinuedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _DiscontinuedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiscontinuedDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiscontinuedDateChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SizeUnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Product_SizeUnitMeasureCode", "UnitMeasure")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UnitMeasure SizeUnitMeasureCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_SizeUnitMeasureCode", "UnitMeasure").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_SizeUnitMeasureCode", "UnitMeasure").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SizeUnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UnitMeasure> SizeUnitMeasureCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_SizeUnitMeasureCode", "UnitMeasure");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UnitMeasure>("AdvWorksModel.Product_SizeUnitMeasureCode", "UnitMeasure", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for WeightUnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Product_WeightUnitMeasureCode", "UnitMeasure")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UnitMeasure WeightUnitMeasureCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_WeightUnitMeasureCode", "UnitMeasure").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_WeightUnitMeasureCode", "UnitMeasure").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for WeightUnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UnitMeasure> WeightUnitMeasureCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.Product_WeightUnitMeasureCode", "UnitMeasure");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UnitMeasure>("AdvWorksModel.Product_WeightUnitMeasureCode", "UnitMeasure", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductSubcategoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Product_ProductSubcategoryId", "ProductSubcategory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductSubcategory ProductSubcategoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductSubcategory>("AdvWorksModel.Product_ProductSubcategoryId", "ProductSubcategory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductSubcategory>("AdvWorksModel.Product_ProductSubcategoryId", "ProductSubcategory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductSubcategoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductSubcategory> ProductSubcategoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductSubcategory>("AdvWorksModel.Product_ProductSubcategoryId", "ProductSubcategory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductSubcategory>("AdvWorksModel.Product_ProductSubcategoryId", "ProductSubcategory", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Product_ProductModelId", "ProductModel")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductModel ProductModelIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.Product_ProductModelId", "ProductModel").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.Product_ProductModelId", "ProductModel").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductModel> ProductModelIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.Product_ProductModelId", "ProductModel");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductModel>("AdvWorksModel.Product_ProductModelId", "ProductModel", value);
                }
            }
        }
    }
    /// <summary>
    /// High-level product categorization.
    /// </summary>
    /// <KeyProperties>
    /// ProductCategoryId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductCategory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductCategory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductCategory object.
        /// </summary>
        /// <param name="productCategoryId">Initial value of ProductCategoryId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductCategory CreateProductCategory(int productCategoryId, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductCategory productCategory = new ProductCategory();
            productCategory.ProductCategoryId = productCategoryId;
            productCategory.Name = name;
            productCategory.Rowguid = rowguid;
            productCategory.ModifiedDate = modifiedDate;
            return productCategory;
        }
        /// <summary>
        /// There are no comments for property ProductCategoryId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductCategoryId
        {
            get
            {
                return this._ProductCategoryId;
            }
            set
            {
                this.OnProductCategoryIdChanging(value);
                this.ReportPropertyChanging("ProductCategoryId");
                this._ProductCategoryId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductCategoryId");
                this.OnProductCategoryIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductCategoryId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductCategoryIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductCategoryIdChanged();
        /// <summary>
        /// Category description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Changes in the cost of a product over time.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// StartDate
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductCostHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductCostHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductCostHistory object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="standardCost">Initial value of StandardCost.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductCostHistory CreateProductCostHistory(int productId, global::System.DateTime startDate, decimal standardCost, global::System.DateTime modifiedDate)
        {
            ProductCostHistory productCostHistory = new ProductCostHistory();
            productCostHistory.ProductId = productId;
            productCostHistory.StartDate = startDate;
            productCostHistory.StandardCost = standardCost;
            productCostHistory.ModifiedDate = modifiedDate;
            return productCostHistory;
        }
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Product cost start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Product cost end date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Standard cost of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal StandardCost
        {
            get
            {
                return this._StandardCost;
            }
            set
            {
                this.OnStandardCostChanging(value);
                this.ReportPropertyChanging("StandardCost");
                this._StandardCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StandardCost");
                this.OnStandardCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _StandardCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardCostChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardCostChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductCostHistory_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductCostHistory_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductCostHistory_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductCostHistory_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductCostHistory_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// Product descriptions in several languages.
    /// </summary>
    /// <KeyProperties>
    /// ProductDescriptionId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductDescription")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductDescription : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductDescription object.
        /// </summary>
        /// <param name="productDescriptionId">Initial value of ProductDescriptionId.</param>
        /// <param name="description">Initial value of Description.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductDescription CreateProductDescription(int productDescriptionId, string description, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductDescription productDescription = new ProductDescription();
            productDescription.ProductDescriptionId = productDescriptionId;
            productDescription.Description = description;
            productDescription.Rowguid = rowguid;
            productDescription.ModifiedDate = modifiedDate;
            return productDescription;
        }
        /// <summary>
        /// There are no comments for property ProductDescriptionId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductDescriptionId
        {
            get
            {
                return this._ProductDescriptionId;
            }
            set
            {
                this.OnProductDescriptionIdChanging(value);
                this.ReportPropertyChanging("ProductDescriptionId");
                this._ProductDescriptionId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductDescriptionId");
                this.OnProductDescriptionIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductDescriptionId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductDescriptionIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductDescriptionIdChanged();
        /// <summary>
        /// Description of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Description
        {
            get
            {
                return this._Description;
            }
            set
            {
                this.OnDescriptionChanging(value);
                this.ReportPropertyChanging("Description");
                this._Description = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Description");
                this.OnDescriptionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Description;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDescriptionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDescriptionChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping products to related product documents.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// DocumentId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductDocument")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductDocument : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductDocument object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="documentId">Initial value of DocumentId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductDocument CreateProductDocument(int productId, int documentId, global::System.DateTime modifiedDate)
        {
            ProductDocument productDocument = new ProductDocument();
            productDocument.ProductId = productId;
            productDocument.DocumentId = documentId;
            productDocument.ModifiedDate = modifiedDate;
            return productDocument;
        }
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Document identification number. Foreign key to Document.DocumentID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int DocumentId
        {
            get
            {
                return this._DocumentId;
            }
            set
            {
                this.OnDocumentIdChanging(value);
                this.ReportPropertyChanging("DocumentId");
                this._DocumentId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DocumentId");
                this.OnDocumentIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _DocumentId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDocumentIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductDocument_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductDocument_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductDocument_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductDocument_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductDocument_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for DocumentIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductDocument_DocumentId", "Document")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Document DocumentIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Document>("AdvWorksModel.ProductDocument_DocumentId", "Document").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Document>("AdvWorksModel.ProductDocument_DocumentId", "Document").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for DocumentIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Document> DocumentIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Document>("AdvWorksModel.ProductDocument_DocumentId", "Document");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Document>("AdvWorksModel.ProductDocument_DocumentId", "Document", value);
                }
            }
        }
    }
    /// <summary>
    /// Product inventory information.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// LocationId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductInventory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductInventory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductInventory object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="locationId">Initial value of LocationId.</param>
        /// <param name="shelf">Initial value of Shelf.</param>
        /// <param name="bin">Initial value of Bin.</param>
        /// <param name="quantity">Initial value of Quantity.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductInventory CreateProductInventory(int productId, short locationId, string shelf, byte bin, short quantity, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductInventory productInventory = new ProductInventory();
            productInventory.ProductId = productId;
            productInventory.LocationId = locationId;
            productInventory.Shelf = shelf;
            productInventory.Bin = bin;
            productInventory.Quantity = quantity;
            productInventory.Rowguid = rowguid;
            productInventory.ModifiedDate = modifiedDate;
            return productInventory;
        }
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Inventory location identification number. Foreign key to Location.LocationID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short LocationId
        {
            get
            {
                return this._LocationId;
            }
            set
            {
                this.OnLocationIdChanging(value);
                this.ReportPropertyChanging("LocationId");
                this._LocationId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LocationId");
                this.OnLocationIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _LocationId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLocationIdChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLocationIdChanged();
        /// <summary>
        /// Storage compartment within an inventory location.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Shelf
        {
            get
            {
                return this._Shelf;
            }
            set
            {
                this.OnShelfChanging(value);
                this.ReportPropertyChanging("Shelf");
                this._Shelf = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Shelf");
                this.OnShelfChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Shelf;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShelfChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShelfChanged();
        /// <summary>
        /// Storage container on a shelf in an inventory location.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte Bin
        {
            get
            {
                return this._Bin;
            }
            set
            {
                this.OnBinChanging(value);
                this.ReportPropertyChanging("Bin");
                this._Bin = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Bin");
                this.OnBinChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _Bin;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBinChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBinChanged();
        /// <summary>
        /// Quantity of products in the inventory location.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short Quantity
        {
            get
            {
                return this._Quantity;
            }
            set
            {
                this.OnQuantityChanging(value);
                this.ReportPropertyChanging("Quantity");
                this._Quantity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Quantity");
                this.OnQuantityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _Quantity;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductInventory_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductInventory_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductInventory_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductInventory_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductInventory_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for LocationIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductInventory_LocationId", "Location")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Location LocationIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.ProductInventory_LocationId", "Location").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.ProductInventory_LocationId", "Location").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for LocationIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Location> LocationIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.ProductInventory_LocationId", "Location");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Location>("AdvWorksModel.ProductInventory_LocationId", "Location", value);
                }
            }
        }
    }
    /// <summary>
    /// Changes in the list price of a product over time.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// StartDate
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductListPriceHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductListPriceHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductListPriceHistory object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="listPrice">Initial value of ListPrice.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductListPriceHistory CreateProductListPriceHistory(int productId, global::System.DateTime startDate, decimal listPrice, global::System.DateTime modifiedDate)
        {
            ProductListPriceHistory productListPriceHistory = new ProductListPriceHistory();
            productListPriceHistory.ProductId = productId;
            productListPriceHistory.StartDate = startDate;
            productListPriceHistory.ListPrice = listPrice;
            productListPriceHistory.ModifiedDate = modifiedDate;
            return productListPriceHistory;
        }
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// List price start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// List price end date
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Product list price.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ListPrice
        {
            get
            {
                return this._ListPrice;
            }
            set
            {
                this.OnListPriceChanging(value);
                this.ReportPropertyChanging("ListPrice");
                this._ListPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ListPrice");
                this.OnListPriceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ListPrice;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnListPriceChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnListPriceChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductListPriceHistory_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductListPriceHistory_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductListPriceHistory_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductListPriceHistory_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductListPriceHistory_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// Product model classification.
    /// </summary>
    /// <KeyProperties>
    /// ProductModelId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductModel")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductModel : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductModel object.
        /// </summary>
        /// <param name="productModelId">Initial value of ProductModelId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductModel CreateProductModel(int productModelId, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductModel productModel = new ProductModel();
            productModel.ProductModelId = productModelId;
            productModel.Name = name;
            productModel.Rowguid = rowguid;
            productModel.ModifiedDate = modifiedDate;
            return productModel;
        }
        /// <summary>
        /// There are no comments for property ProductModelId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductModelId
        {
            get
            {
                return this._ProductModelId;
            }
            set
            {
                this.OnProductModelIdChanging(value);
                this.ReportPropertyChanging("ProductModelId");
                this._ProductModelId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductModelId");
                this.OnProductModelIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductModelId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanged();
        /// <summary>
        /// Product model description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Detailed product catalog information in xml format.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CatalogDescription
        {
            get
            {
                return this._CatalogDescription;
            }
            set
            {
                this.OnCatalogDescriptionChanging(value);
                this.ReportPropertyChanging("CatalogDescription");
                this._CatalogDescription = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("CatalogDescription");
                this.OnCatalogDescriptionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CatalogDescription;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCatalogDescriptionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCatalogDescriptionChanged();
        /// <summary>
        /// Manufacturing instructions in xml format.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Instructions
        {
            get
            {
                return this._Instructions;
            }
            set
            {
                this.OnInstructionsChanging(value);
                this.ReportPropertyChanging("Instructions");
                this._Instructions = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Instructions");
                this.OnInstructionsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Instructions;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnInstructionsChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnInstructionsChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping product models and illustrations.
    /// </summary>
    /// <KeyProperties>
    /// ProductModelId
    /// IllustrationId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductModelIllustration")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductModelIllustration : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductModelIllustration object.
        /// </summary>
        /// <param name="productModelId">Initial value of ProductModelId.</param>
        /// <param name="illustrationId">Initial value of IllustrationId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductModelIllustration CreateProductModelIllustration(int productModelId, int illustrationId, global::System.DateTime modifiedDate)
        {
            ProductModelIllustration productModelIllustration = new ProductModelIllustration();
            productModelIllustration.ProductModelId = productModelId;
            productModelIllustration.IllustrationId = illustrationId;
            productModelIllustration.ModifiedDate = modifiedDate;
            return productModelIllustration;
        }
        /// <summary>
        /// Primary key. Foreign key to ProductModel.ProductModelID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductModelId
        {
            get
            {
                return this._ProductModelId;
            }
            set
            {
                this.OnProductModelIdChanging(value);
                this.ReportPropertyChanging("ProductModelId");
                this._ProductModelId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductModelId");
                this.OnProductModelIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductModelId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanged();
        /// <summary>
        /// Primary key. Foreign key to Illustration.IllustrationID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int IllustrationId
        {
            get
            {
                return this._IllustrationId;
            }
            set
            {
                this.OnIllustrationIdChanging(value);
                this.ReportPropertyChanging("IllustrationId");
                this._IllustrationId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("IllustrationId");
                this.OnIllustrationIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _IllustrationId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIllustrationIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIllustrationIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductModelIllustration_ProductModelId", "ProductModel")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductModel ProductModelIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelIllustration_ProductModelId", "ProductModel").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelIllustration_ProductModelId", "ProductModel").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductModel> ProductModelIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelIllustration_ProductModelId", "ProductModel");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductModel>("AdvWorksModel.ProductModelIllustration_ProductModelId", "ProductModel", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for IllustrationIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductModelIllustration_IllustrationId", "Illustration")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Illustration IllustrationIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Illustration>("AdvWorksModel.ProductModelIllustration_IllustrationId", "Illustration").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Illustration>("AdvWorksModel.ProductModelIllustration_IllustrationId", "Illustration").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for IllustrationIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Illustration> IllustrationIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Illustration>("AdvWorksModel.ProductModelIllustration_IllustrationId", "Illustration");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Illustration>("AdvWorksModel.ProductModelIllustration_IllustrationId", "Illustration", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping product descriptions and the language the description is written in.
    /// </summary>
    /// <KeyProperties>
    /// ProductModelId
    /// ProductDescriptionId
    /// CultureId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductModelProductDescriptionCulture")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductModelProductDescriptionCulture : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductModelProductDescriptionCulture object.
        /// </summary>
        /// <param name="productModelId">Initial value of ProductModelId.</param>
        /// <param name="productDescriptionId">Initial value of ProductDescriptionId.</param>
        /// <param name="cultureId">Initial value of CultureId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductModelProductDescriptionCulture CreateProductModelProductDescriptionCulture(int productModelId, int productDescriptionId, string cultureId, global::System.DateTime modifiedDate)
        {
            ProductModelProductDescriptionCulture productModelProductDescriptionCulture = new ProductModelProductDescriptionCulture();
            productModelProductDescriptionCulture.ProductModelId = productModelId;
            productModelProductDescriptionCulture.ProductDescriptionId = productDescriptionId;
            productModelProductDescriptionCulture.CultureId = cultureId;
            productModelProductDescriptionCulture.ModifiedDate = modifiedDate;
            return productModelProductDescriptionCulture;
        }
        /// <summary>
        /// Primary key. Foreign key to ProductModel.ProductModelID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductModelId
        {
            get
            {
                return this._ProductModelId;
            }
            set
            {
                this.OnProductModelIdChanging(value);
                this.ReportPropertyChanging("ProductModelId");
                this._ProductModelId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductModelId");
                this.OnProductModelIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductModelId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductModelIdChanged();
        /// <summary>
        /// Primary key. Foreign key to ProductDescription.ProductDescriptionID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductDescriptionId
        {
            get
            {
                return this._ProductDescriptionId;
            }
            set
            {
                this.OnProductDescriptionIdChanging(value);
                this.ReportPropertyChanging("ProductDescriptionId");
                this._ProductDescriptionId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductDescriptionId");
                this.OnProductDescriptionIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductDescriptionId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductDescriptionIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductDescriptionIdChanged();
        /// <summary>
        /// Culture identification number. Foreign key to Culture.CultureID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CultureId
        {
            get
            {
                return this._CultureId;
            }
            set
            {
                this.OnCultureIdChanging(value);
                this.ReportPropertyChanging("CultureId");
                this._CultureId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CultureId");
                this.OnCultureIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CultureId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCultureIdChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCultureIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_ProductModelId", "ProductModel")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductModel ProductModelIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductModelId", "ProductModel").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductModelId", "ProductModel").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductModelIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductModel> ProductModelIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductModel>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductModelId", "ProductModel");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductModel>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductModelId", "ProductModel", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductDescriptionIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductDescription ProductDescriptionIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductDescription>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductDescription>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductDescriptionIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductDescription> ProductDescriptionIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductDescription>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductDescription>("AdvWorksModel.ProductModelProductDescriptionCulture_ProductDescriptionId", "ProductDescription", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CultureIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductModelProductDescriptionCulture_CultureId", "Culture")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Culture CultureIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Culture>("AdvWorksModel.ProductModelProductDescriptionCulture_CultureId", "Culture").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Culture>("AdvWorksModel.ProductModelProductDescriptionCulture_CultureId", "Culture").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CultureIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Culture> CultureIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Culture>("AdvWorksModel.ProductModelProductDescriptionCulture_CultureId", "Culture");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Culture>("AdvWorksModel.ProductModelProductDescriptionCulture_CultureId", "Culture", value);
                }
            }
        }
    }
    /// <summary>
    /// Product images.
    /// </summary>
    /// <KeyProperties>
    /// ProductPhotoId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductPhoto")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductPhoto : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductPhoto object.
        /// </summary>
        /// <param name="productPhotoId">Initial value of ProductPhotoId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductPhoto CreateProductPhoto(int productPhotoId, global::System.DateTime modifiedDate)
        {
            ProductPhoto productPhoto = new ProductPhoto();
            productPhoto.ProductPhotoId = productPhotoId;
            productPhoto.ModifiedDate = modifiedDate;
            return productPhoto;
        }
        /// <summary>
        /// There are no comments for property ProductPhotoId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductPhotoId
        {
            get
            {
                return this._ProductPhotoId;
            }
            set
            {
                this.OnProductPhotoIdChanging(value);
                this.ReportPropertyChanging("ProductPhotoId");
                this._ProductPhotoId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductPhotoId");
                this.OnProductPhotoIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductPhotoId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductPhotoIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductPhotoIdChanged();
        /// <summary>
        /// Small image of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte[] ThumbNailPhoto
        {
            get
            {
                return global::System.Data.Objects.DataClasses.StructuralObject.GetValidValue(this._ThumbNailPhoto);
            }
            set
            {
                this.OnThumbNailPhotoChanging(value);
                this.ReportPropertyChanging("ThumbNailPhoto");
                this._ThumbNailPhoto = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ThumbNailPhoto");
                this.OnThumbNailPhotoChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte[] _ThumbNailPhoto;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnThumbNailPhotoChanging(byte[] value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnThumbNailPhotoChanged();
        /// <summary>
        /// Small image file name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ThumbnailPhotoFileName
        {
            get
            {
                return this._ThumbnailPhotoFileName;
            }
            set
            {
                this.OnThumbnailPhotoFileNameChanging(value);
                this.ReportPropertyChanging("ThumbnailPhotoFileName");
                this._ThumbnailPhotoFileName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("ThumbnailPhotoFileName");
                this.OnThumbnailPhotoFileNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ThumbnailPhotoFileName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnThumbnailPhotoFileNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnThumbnailPhotoFileNameChanged();
        /// <summary>
        /// Large image of the product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte[] LargePhoto
        {
            get
            {
                return global::System.Data.Objects.DataClasses.StructuralObject.GetValidValue(this._LargePhoto);
            }
            set
            {
                this.OnLargePhotoChanging(value);
                this.ReportPropertyChanging("LargePhoto");
                this._LargePhoto = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("LargePhoto");
                this.OnLargePhotoChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte[] _LargePhoto;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLargePhotoChanging(byte[] value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLargePhotoChanged();
        /// <summary>
        /// Large image file name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string LargePhotoFileName
        {
            get
            {
                return this._LargePhotoFileName;
            }
            set
            {
                this.OnLargePhotoFileNameChanging(value);
                this.ReportPropertyChanging("LargePhotoFileName");
                this._LargePhotoFileName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("LargePhotoFileName");
                this.OnLargePhotoFileNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _LargePhotoFileName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLargePhotoFileNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLargePhotoFileNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping products and product photos.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// ProductPhotoId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductProductPhoto")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductProductPhoto : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductProductPhoto object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="productPhotoId">Initial value of ProductPhotoId.</param>
        /// <param name="primary">Initial value of Primary.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductProductPhoto CreateProductProductPhoto(int productId, int productPhotoId, bool primary, global::System.DateTime modifiedDate)
        {
            ProductProductPhoto productProductPhoto = new ProductProductPhoto();
            productProductPhoto.ProductId = productId;
            productProductPhoto.ProductPhotoId = productPhotoId;
            productProductPhoto.Primary = primary;
            productProductPhoto.ModifiedDate = modifiedDate;
            return productProductPhoto;
        }
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Product photo identification number. Foreign key to ProductPhoto.ProductPhotoID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductPhotoId
        {
            get
            {
                return this._ProductPhotoId;
            }
            set
            {
                this.OnProductPhotoIdChanging(value);
                this.ReportPropertyChanging("ProductPhotoId");
                this._ProductPhotoId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductPhotoId");
                this.OnProductPhotoIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductPhotoId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductPhotoIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductPhotoIdChanged();
        /// <summary>
        /// 0 = Photo is not the principal image. 1 = Photo is the principal image.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool Primary
        {
            get
            {
                return this._Primary;
            }
            set
            {
                this.OnPrimaryChanging(value);
                this.ReportPropertyChanging("Primary");
                this._Primary = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Primary");
                this.OnPrimaryChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _Primary;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPrimaryChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPrimaryChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductProductPhoto_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductProductPhoto_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductProductPhoto_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductProductPhoto_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductProductPhoto_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductPhotoIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductProductPhoto_ProductPhotoId", "ProductPhoto")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductPhoto ProductPhotoIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductPhoto>("AdvWorksModel.ProductProductPhoto_ProductPhotoId", "ProductPhoto").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductPhoto>("AdvWorksModel.ProductProductPhoto_ProductPhotoId", "ProductPhoto").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductPhotoIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductPhoto> ProductPhotoIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductPhoto>("AdvWorksModel.ProductProductPhoto_ProductPhotoId", "ProductPhoto");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductPhoto>("AdvWorksModel.ProductProductPhoto_ProductPhotoId", "ProductPhoto", value);
                }
            }
        }
    }
    /// <summary>
    /// Customer reviews of products they have purchased.
    /// </summary>
    /// <KeyProperties>
    /// ProductReviewId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductReview")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductReview : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductReview object.
        /// </summary>
        /// <param name="productReviewId">Initial value of ProductReviewId.</param>
        /// <param name="reviewerName">Initial value of ReviewerName.</param>
        /// <param name="reviewDate">Initial value of ReviewDate.</param>
        /// <param name="emailAddress">Initial value of EmailAddress.</param>
        /// <param name="rating">Initial value of Rating.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductReview CreateProductReview(int productReviewId, string reviewerName, global::System.DateTime reviewDate, string emailAddress, int rating, global::System.DateTime modifiedDate)
        {
            ProductReview productReview = new ProductReview();
            productReview.ProductReviewId = productReviewId;
            productReview.ReviewerName = reviewerName;
            productReview.ReviewDate = reviewDate;
            productReview.EmailAddress = emailAddress;
            productReview.Rating = rating;
            productReview.ModifiedDate = modifiedDate;
            return productReview;
        }
        /// <summary>
        /// There are no comments for property ProductReviewId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductReviewId
        {
            get
            {
                return this._ProductReviewId;
            }
            set
            {
                this.OnProductReviewIdChanging(value);
                this.ReportPropertyChanging("ProductReviewId");
                this._ProductReviewId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductReviewId");
                this.OnProductReviewIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductReviewId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductReviewIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductReviewIdChanged();
        /// <summary>
        /// Name of the reviewer.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ReviewerName
        {
            get
            {
                return this._ReviewerName;
            }
            set
            {
                this.OnReviewerNameChanging(value);
                this.ReportPropertyChanging("ReviewerName");
                this._ReviewerName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ReviewerName");
                this.OnReviewerNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ReviewerName;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReviewerNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReviewerNameChanged();
        /// <summary>
        /// Date review was submitted.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ReviewDate
        {
            get
            {
                return this._ReviewDate;
            }
            set
            {
                this.OnReviewDateChanging(value);
                this.ReportPropertyChanging("ReviewDate");
                this._ReviewDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReviewDate");
                this.OnReviewDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ReviewDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReviewDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReviewDateChanged();
        /// <summary>
        /// Reviewer&apos;s e-mail address.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string EmailAddress
        {
            get
            {
                return this._EmailAddress;
            }
            set
            {
                this.OnEmailAddressChanging(value);
                this.ReportPropertyChanging("EmailAddress");
                this._EmailAddress = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("EmailAddress");
                this.OnEmailAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _EmailAddress;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailAddressChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEmailAddressChanged();
        /// <summary>
        /// Product rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int Rating
        {
            get
            {
                return this._Rating;
            }
            set
            {
                this.OnRatingChanging(value);
                this.ReportPropertyChanging("Rating");
                this._Rating = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rating");
                this.OnRatingChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _Rating;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRatingChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRatingChanged();
        /// <summary>
        /// Reviewer&apos;s comments
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Comments
        {
            get
            {
                return this._Comments;
            }
            set
            {
                this.OnCommentsChanging(value);
                this.ReportPropertyChanging("Comments");
                this._Comments = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Comments");
                this.OnCommentsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Comments;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommentsChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommentsChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductReview_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductReview_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductReview_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductReview_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductReview_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// Product subcategories. See ProductCategory table.
    /// </summary>
    /// <KeyProperties>
    /// ProductSubcategoryId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductSubcategory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductSubcategory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductSubcategory object.
        /// </summary>
        /// <param name="productSubcategoryId">Initial value of ProductSubcategoryId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductSubcategory CreateProductSubcategory(int productSubcategoryId, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ProductSubcategory productSubcategory = new ProductSubcategory();
            productSubcategory.ProductSubcategoryId = productSubcategoryId;
            productSubcategory.Name = name;
            productSubcategory.Rowguid = rowguid;
            productSubcategory.ModifiedDate = modifiedDate;
            return productSubcategory;
        }
        /// <summary>
        /// There are no comments for property ProductSubcategoryId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductSubcategoryId
        {
            get
            {
                return this._ProductSubcategoryId;
            }
            set
            {
                this.OnProductSubcategoryIdChanging(value);
                this.ReportPropertyChanging("ProductSubcategoryId");
                this._ProductSubcategoryId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductSubcategoryId");
                this.OnProductSubcategoryIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductSubcategoryId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductSubcategoryIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductSubcategoryIdChanged();
        /// <summary>
        /// Subcategory description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductCategoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductSubcategory_ProductCategoryId", "ProductCategory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ProductCategory ProductCategoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductCategory>("AdvWorksModel.ProductSubcategory_ProductCategoryId", "ProductCategory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductCategory>("AdvWorksModel.ProductSubcategory_ProductCategoryId", "ProductCategory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductCategoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ProductCategory> ProductCategoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ProductCategory>("AdvWorksModel.ProductSubcategory_ProductCategoryId", "ProductCategory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ProductCategory>("AdvWorksModel.ProductSubcategory_ProductCategoryId", "ProductCategory", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping vendors with the products they supply.
    /// </summary>
    /// <KeyProperties>
    /// ProductId
    /// VendorId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ProductVendor")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ProductVendor : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ProductVendor object.
        /// </summary>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="vendorId">Initial value of VendorId.</param>
        /// <param name="averageLeadTime">Initial value of AverageLeadTime.</param>
        /// <param name="standardPrice">Initial value of StandardPrice.</param>
        /// <param name="minOrderQty">Initial value of MinOrderQty.</param>
        /// <param name="maxOrderQty">Initial value of MaxOrderQty.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ProductVendor CreateProductVendor(int productId, int vendorId, int averageLeadTime, decimal standardPrice, int minOrderQty, int maxOrderQty, global::System.DateTime modifiedDate)
        {
            ProductVendor productVendor = new ProductVendor();
            productVendor.ProductId = productId;
            productVendor.VendorId = vendorId;
            productVendor.AverageLeadTime = averageLeadTime;
            productVendor.StandardPrice = standardPrice;
            productVendor.MinOrderQty = minOrderQty;
            productVendor.MaxOrderQty = maxOrderQty;
            productVendor.ModifiedDate = modifiedDate;
            return productVendor;
        }
        /// <summary>
        /// Primary key. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Primary key. Foreign key to Vendor.VendorID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int VendorId
        {
            get
            {
                return this._VendorId;
            }
            set
            {
                this.OnVendorIdChanging(value);
                this.ReportPropertyChanging("VendorId");
                this._VendorId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VendorId");
                this.OnVendorIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _VendorId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanged();
        /// <summary>
        /// The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int AverageLeadTime
        {
            get
            {
                return this._AverageLeadTime;
            }
            set
            {
                this.OnAverageLeadTimeChanging(value);
                this.ReportPropertyChanging("AverageLeadTime");
                this._AverageLeadTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AverageLeadTime");
                this.OnAverageLeadTimeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _AverageLeadTime;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAverageLeadTimeChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAverageLeadTimeChanged();
        /// <summary>
        /// The vendor&apos;s usual selling price.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal StandardPrice
        {
            get
            {
                return this._StandardPrice;
            }
            set
            {
                this.OnStandardPriceChanging(value);
                this.ReportPropertyChanging("StandardPrice");
                this._StandardPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StandardPrice");
                this.OnStandardPriceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _StandardPrice;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardPriceChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStandardPriceChanged();
        /// <summary>
        /// The selling price when last purchased.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<decimal> LastReceiptCost
        {
            get
            {
                return this._LastReceiptCost;
            }
            set
            {
                this.OnLastReceiptCostChanging(value);
                this.ReportPropertyChanging("LastReceiptCost");
                this._LastReceiptCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LastReceiptCost");
                this.OnLastReceiptCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<decimal> _LastReceiptCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastReceiptCostChanging(global::System.Nullable<decimal> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastReceiptCostChanged();
        /// <summary>
        /// Date the product was last received by the vendor.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> LastReceiptDate
        {
            get
            {
                return this._LastReceiptDate;
            }
            set
            {
                this.OnLastReceiptDateChanging(value);
                this.ReportPropertyChanging("LastReceiptDate");
                this._LastReceiptDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LastReceiptDate");
                this.OnLastReceiptDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _LastReceiptDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastReceiptDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLastReceiptDateChanged();
        /// <summary>
        /// The maximum quantity that should be ordered.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int MinOrderQty
        {
            get
            {
                return this._MinOrderQty;
            }
            set
            {
                this.OnMinOrderQtyChanging(value);
                this.ReportPropertyChanging("MinOrderQty");
                this._MinOrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("MinOrderQty");
                this.OnMinOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _MinOrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMinOrderQtyChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMinOrderQtyChanged();
        /// <summary>
        /// The minimum quantity that should be ordered.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int MaxOrderQty
        {
            get
            {
                return this._MaxOrderQty;
            }
            set
            {
                this.OnMaxOrderQtyChanging(value);
                this.ReportPropertyChanging("MaxOrderQty");
                this._MaxOrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("MaxOrderQty");
                this.OnMaxOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _MaxOrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaxOrderQtyChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaxOrderQtyChanged();
        /// <summary>
        /// The quantity currently on order.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<int> OnOrderQty
        {
            get
            {
                return this._OnOrderQty;
            }
            set
            {
                this.OnOnOrderQtyChanging(value);
                this.ReportPropertyChanging("OnOrderQty");
                this._OnOrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OnOrderQty");
                this.OnOnOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<int> _OnOrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOnOrderQtyChanging(global::System.Nullable<int> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOnOrderQtyChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for UnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductVendor_UnitMeasureCode", "UnitMeasure")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public UnitMeasure UnitMeasureCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.ProductVendor_UnitMeasureCode", "UnitMeasure").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.ProductVendor_UnitMeasureCode", "UnitMeasure").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for UnitMeasureCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<UnitMeasure> UnitMeasureCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<UnitMeasure>("AdvWorksModel.ProductVendor_UnitMeasureCode", "UnitMeasure");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<UnitMeasure>("AdvWorksModel.ProductVendor_UnitMeasureCode", "UnitMeasure", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductVendor_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductVendor_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductVendor_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ProductVendor_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ProductVendor_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for VendorIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ProductVendor_VendorId", "Vendor")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Vendor VendorIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.ProductVendor_VendorId", "Vendor").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.ProductVendor_VendorId", "Vendor").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for VendorIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Vendor> VendorIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.ProductVendor_VendorId", "Vendor");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Vendor>("AdvWorksModel.ProductVendor_VendorId", "Vendor", value);
                }
            }
        }
    }
    /// <summary>
    /// Individual products associated with a specific purchase order. See PurchaseOrderHeader.
    /// </summary>
    /// <KeyProperties>
    /// PurchaseOrderId
    /// PurchaseOrderDetailId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="PurchaseOrderDetail")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class PurchaseOrderDetail : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new PurchaseOrderDetail object.
        /// </summary>
        /// <param name="purchaseOrderId">Initial value of PurchaseOrderId.</param>
        /// <param name="purchaseOrderDetailId">Initial value of PurchaseOrderDetailId.</param>
        /// <param name="dueDate">Initial value of DueDate.</param>
        /// <param name="orderQty">Initial value of OrderQty.</param>
        /// <param name="unitPrice">Initial value of UnitPrice.</param>
        /// <param name="lineTotal">Initial value of LineTotal.</param>
        /// <param name="receivedQty">Initial value of ReceivedQty.</param>
        /// <param name="rejectedQty">Initial value of RejectedQty.</param>
        /// <param name="stockedQty">Initial value of StockedQty.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static PurchaseOrderDetail CreatePurchaseOrderDetail(int purchaseOrderId, int purchaseOrderDetailId, global::System.DateTime dueDate, short orderQty, decimal unitPrice, decimal lineTotal, decimal receivedQty, decimal rejectedQty, decimal stockedQty, global::System.DateTime modifiedDate)
        {
            PurchaseOrderDetail purchaseOrderDetail = new PurchaseOrderDetail();
            purchaseOrderDetail.PurchaseOrderId = purchaseOrderId;
            purchaseOrderDetail.PurchaseOrderDetailId = purchaseOrderDetailId;
            purchaseOrderDetail.DueDate = dueDate;
            purchaseOrderDetail.OrderQty = orderQty;
            purchaseOrderDetail.UnitPrice = unitPrice;
            purchaseOrderDetail.LineTotal = lineTotal;
            purchaseOrderDetail.ReceivedQty = receivedQty;
            purchaseOrderDetail.RejectedQty = rejectedQty;
            purchaseOrderDetail.StockedQty = stockedQty;
            purchaseOrderDetail.ModifiedDate = modifiedDate;
            return purchaseOrderDetail;
        }
        /// <summary>
        /// Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int PurchaseOrderId
        {
            get
            {
                return this._PurchaseOrderId;
            }
            set
            {
                this.OnPurchaseOrderIdChanging(value);
                this.ReportPropertyChanging("PurchaseOrderId");
                this._PurchaseOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PurchaseOrderId");
                this.OnPurchaseOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _PurchaseOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderIdChanged();
        /// <summary>
        /// Primary key. One line number per purchased product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int PurchaseOrderDetailId
        {
            get
            {
                return this._PurchaseOrderDetailId;
            }
            set
            {
                this.OnPurchaseOrderDetailIdChanging(value);
                this.ReportPropertyChanging("PurchaseOrderDetailId");
                this._PurchaseOrderDetailId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PurchaseOrderDetailId");
                this.OnPurchaseOrderDetailIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _PurchaseOrderDetailId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderDetailIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderDetailIdChanged();
        /// <summary>
        /// Date the product is expected to be received.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime DueDate
        {
            get
            {
                return this._DueDate;
            }
            set
            {
                this.OnDueDateChanging(value);
                this.ReportPropertyChanging("DueDate");
                this._DueDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DueDate");
                this.OnDueDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _DueDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanged();
        /// <summary>
        /// Quantity ordered.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short OrderQty
        {
            get
            {
                return this._OrderQty;
            }
            set
            {
                this.OnOrderQtyChanging(value);
                this.ReportPropertyChanging("OrderQty");
                this._OrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderQty");
                this.OnOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _OrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanged();
        /// <summary>
        /// Vendor&apos;s selling price of a single product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal UnitPrice
        {
            get
            {
                return this._UnitPrice;
            }
            set
            {
                this.OnUnitPriceChanging(value);
                this.ReportPropertyChanging("UnitPrice");
                this._UnitPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UnitPrice");
                this.OnUnitPriceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _UnitPrice;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceChanged();
        /// <summary>
        /// Per product subtotal. Computed as OrderQty * UnitPrice.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal LineTotal
        {
            get
            {
                return this._LineTotal;
            }
            set
            {
                this.OnLineTotalChanging(value);
                this.ReportPropertyChanging("LineTotal");
                this._LineTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LineTotal");
                this.OnLineTotalChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _LineTotal;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLineTotalChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLineTotalChanged();
        /// <summary>
        /// Quantity actually received from the vendor.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ReceivedQty
        {
            get
            {
                return this._ReceivedQty;
            }
            set
            {
                this.OnReceivedQtyChanging(value);
                this.ReportPropertyChanging("ReceivedQty");
                this._ReceivedQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReceivedQty");
                this.OnReceivedQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ReceivedQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReceivedQtyChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReceivedQtyChanged();
        /// <summary>
        /// Quantity rejected during inspection.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal RejectedQty
        {
            get
            {
                return this._RejectedQty;
            }
            set
            {
                this.OnRejectedQtyChanging(value);
                this.ReportPropertyChanging("RejectedQty");
                this._RejectedQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("RejectedQty");
                this.OnRejectedQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _RejectedQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRejectedQtyChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRejectedQtyChanged();
        /// <summary>
        /// Quantity accepted into inventory. Computed as ReceivedQty - RejectedQty.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal StockedQty
        {
            get
            {
                return this._StockedQty;
            }
            set
            {
                this.OnStockedQtyChanging(value);
                this.ReportPropertyChanging("StockedQty");
                this._StockedQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StockedQty");
                this.OnStockedQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _StockedQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStockedQtyChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStockedQtyChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "PurchaseOrderDetail_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.PurchaseOrderDetail_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.PurchaseOrderDetail_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.PurchaseOrderDetail_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.PurchaseOrderDetail_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for PurchaseOrderIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public PurchaseOrderHeader PurchaseOrderIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<PurchaseOrderHeader>("AdvWorksModel.PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<PurchaseOrderHeader>("AdvWorksModel.PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for PurchaseOrderIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<PurchaseOrderHeader> PurchaseOrderIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<PurchaseOrderHeader>("AdvWorksModel.PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<PurchaseOrderHeader>("AdvWorksModel.PurchaseOrderDetail_PurchaseOrderId", "PurchaseOrderHeader", value);
                }
            }
        }
    }
    /// <summary>
    /// General purchase order information. See PurchaseOrderDetail.
    /// </summary>
    /// <KeyProperties>
    /// PurchaseOrderId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="PurchaseOrderHeader")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class PurchaseOrderHeader : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new PurchaseOrderHeader object.
        /// </summary>
        /// <param name="purchaseOrderId">Initial value of PurchaseOrderId.</param>
        /// <param name="revisionNumber">Initial value of RevisionNumber.</param>
        /// <param name="status">Initial value of Status.</param>
        /// <param name="orderDate">Initial value of OrderDate.</param>
        /// <param name="subTotal">Initial value of SubTotal.</param>
        /// <param name="taxAmt">Initial value of TaxAmt.</param>
        /// <param name="freight">Initial value of Freight.</param>
        /// <param name="totalDue">Initial value of TotalDue.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static PurchaseOrderHeader CreatePurchaseOrderHeader(int purchaseOrderId, byte revisionNumber, byte status, global::System.DateTime orderDate, decimal subTotal, decimal taxAmt, decimal freight, decimal totalDue, global::System.DateTime modifiedDate)
        {
            PurchaseOrderHeader purchaseOrderHeader = new PurchaseOrderHeader();
            purchaseOrderHeader.PurchaseOrderId = purchaseOrderId;
            purchaseOrderHeader.RevisionNumber = revisionNumber;
            purchaseOrderHeader.Status = status;
            purchaseOrderHeader.OrderDate = orderDate;
            purchaseOrderHeader.SubTotal = subTotal;
            purchaseOrderHeader.TaxAmt = taxAmt;
            purchaseOrderHeader.Freight = freight;
            purchaseOrderHeader.TotalDue = totalDue;
            purchaseOrderHeader.ModifiedDate = modifiedDate;
            return purchaseOrderHeader;
        }
        /// <summary>
        /// There are no comments for property PurchaseOrderId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int PurchaseOrderId
        {
            get
            {
                return this._PurchaseOrderId;
            }
            set
            {
                this.OnPurchaseOrderIdChanging(value);
                this.ReportPropertyChanging("PurchaseOrderId");
                this._PurchaseOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PurchaseOrderId");
                this.OnPurchaseOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _PurchaseOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderIdChanged();
        /// <summary>
        /// Incremental number to track changes to the purchase order over time.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte RevisionNumber
        {
            get
            {
                return this._RevisionNumber;
            }
            set
            {
                this.OnRevisionNumberChanging(value);
                this.ReportPropertyChanging("RevisionNumber");
                this._RevisionNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("RevisionNumber");
                this.OnRevisionNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _RevisionNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionNumberChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionNumberChanged();
        /// <summary>
        /// Order current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte Status
        {
            get
            {
                return this._Status;
            }
            set
            {
                this.OnStatusChanging(value);
                this.ReportPropertyChanging("Status");
                this._Status = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Status");
                this.OnStatusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _Status;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanged();
        /// <summary>
        /// Purchase order creation date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime OrderDate
        {
            get
            {
                return this._OrderDate;
            }
            set
            {
                this.OnOrderDateChanging(value);
                this.ReportPropertyChanging("OrderDate");
                this._OrderDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderDate");
                this.OnOrderDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _OrderDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderDateChanged();
        /// <summary>
        /// Estimated shipment date from the vendor.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> ShipDate
        {
            get
            {
                return this._ShipDate;
            }
            set
            {
                this.OnShipDateChanging(value);
                this.ReportPropertyChanging("ShipDate");
                this._ShipDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShipDate");
                this.OnShipDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _ShipDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipDateChanged();
        /// <summary>
        /// Purchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SubTotal
        {
            get
            {
                return this._SubTotal;
            }
            set
            {
                this.OnSubTotalChanging(value);
                this.ReportPropertyChanging("SubTotal");
                this._SubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SubTotal");
                this.OnSubTotalChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SubTotal;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSubTotalChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSubTotalChanged();
        /// <summary>
        /// Tax amount.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal TaxAmt
        {
            get
            {
                return this._TaxAmt;
            }
            set
            {
                this.OnTaxAmtChanging(value);
                this.ReportPropertyChanging("TaxAmt");
                this._TaxAmt = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TaxAmt");
                this.OnTaxAmtChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _TaxAmt;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxAmtChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxAmtChanged();
        /// <summary>
        /// Shipping cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal Freight
        {
            get
            {
                return this._Freight;
            }
            set
            {
                this.OnFreightChanging(value);
                this.ReportPropertyChanging("Freight");
                this._Freight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Freight");
                this.OnFreightChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _Freight;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFreightChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFreightChanged();
        /// <summary>
        /// Total due to vendor. Computed as Subtotal + TaxAmt + Freight.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal TotalDue
        {
            get
            {
                return this._TotalDue;
            }
            set
            {
                this.OnTotalDueChanging(value);
                this.ReportPropertyChanging("TotalDue");
                this._TotalDue = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TotalDue");
                this.OnTotalDueChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _TotalDue;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTotalDueChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTotalDueChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for EmployeeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "PurchaseOrderHeader_EmployeeId", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee EmployeeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.PurchaseOrderHeader_EmployeeId", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.PurchaseOrderHeader_EmployeeId", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for EmployeeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> EmployeeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.PurchaseOrderHeader_EmployeeId", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.PurchaseOrderHeader_EmployeeId", "Employee", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for VendorIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "PurchaseOrderHeader_VendorId", "Vendor")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Vendor VendorIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.PurchaseOrderHeader_VendorId", "Vendor").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.PurchaseOrderHeader_VendorId", "Vendor").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for VendorIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Vendor> VendorIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.PurchaseOrderHeader_VendorId", "Vendor");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Vendor>("AdvWorksModel.PurchaseOrderHeader_VendorId", "Vendor", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ShipMethodIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "PurchaseOrderHeader_ShipMethodId", "ShipMethod")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ShipMethod ShipMethodIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.PurchaseOrderHeader_ShipMethodId", "ShipMethod").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.PurchaseOrderHeader_ShipMethodId", "ShipMethod").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ShipMethodIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ShipMethod> ShipMethodIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.PurchaseOrderHeader_ShipMethodId", "ShipMethod");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ShipMethod>("AdvWorksModel.PurchaseOrderHeader_ShipMethodId", "ShipMethod", value);
                }
            }
        }
    }
    /// <summary>
    /// Individual products associated with a specific sales order. See SalesOrderHeader.
    /// </summary>
    /// <KeyProperties>
    /// SalesOrderId
    /// SalesOrderDetailId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesOrderDetail")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesOrderDetail : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesOrderDetail object.
        /// </summary>
        /// <param name="salesOrderId">Initial value of SalesOrderId.</param>
        /// <param name="salesOrderDetailId">Initial value of SalesOrderDetailId.</param>
        /// <param name="orderQty">Initial value of OrderQty.</param>
        /// <param name="unitPrice">Initial value of UnitPrice.</param>
        /// <param name="unitPriceDiscount">Initial value of UnitPriceDiscount.</param>
        /// <param name="lineTotal">Initial value of LineTotal.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesOrderDetail CreateSalesOrderDetail(int salesOrderId, int salesOrderDetailId, short orderQty, decimal unitPrice, decimal unitPriceDiscount, decimal lineTotal, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesOrderDetail salesOrderDetail = new SalesOrderDetail();
            salesOrderDetail.SalesOrderId = salesOrderId;
            salesOrderDetail.SalesOrderDetailId = salesOrderDetailId;
            salesOrderDetail.OrderQty = orderQty;
            salesOrderDetail.UnitPrice = unitPrice;
            salesOrderDetail.UnitPriceDiscount = unitPriceDiscount;
            salesOrderDetail.LineTotal = lineTotal;
            salesOrderDetail.Rowguid = rowguid;
            salesOrderDetail.ModifiedDate = modifiedDate;
            return salesOrderDetail;
        }
        /// <summary>
        /// Primary key. Foreign key to SalesOrderHeader.SalesOrderID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesOrderId
        {
            get
            {
                return this._SalesOrderId;
            }
            set
            {
                this.OnSalesOrderIdChanging(value);
                this.ReportPropertyChanging("SalesOrderId");
                this._SalesOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesOrderId");
                this.OnSalesOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanged();
        /// <summary>
        /// Primary key. One incremental unique number per product sold.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesOrderDetailId
        {
            get
            {
                return this._SalesOrderDetailId;
            }
            set
            {
                this.OnSalesOrderDetailIdChanging(value);
                this.ReportPropertyChanging("SalesOrderDetailId");
                this._SalesOrderDetailId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesOrderDetailId");
                this.OnSalesOrderDetailIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesOrderDetailId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderDetailIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderDetailIdChanged();
        /// <summary>
        /// Shipment tracking number supplied by the shipper.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CarrierTrackingNumber
        {
            get
            {
                return this._CarrierTrackingNumber;
            }
            set
            {
                this.OnCarrierTrackingNumberChanging(value);
                this.ReportPropertyChanging("CarrierTrackingNumber");
                this._CarrierTrackingNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("CarrierTrackingNumber");
                this.OnCarrierTrackingNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CarrierTrackingNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCarrierTrackingNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCarrierTrackingNumberChanged();
        /// <summary>
        /// Quantity ordered per product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short OrderQty
        {
            get
            {
                return this._OrderQty;
            }
            set
            {
                this.OnOrderQtyChanging(value);
                this.ReportPropertyChanging("OrderQty");
                this._OrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderQty");
                this.OnOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _OrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanged();
        /// <summary>
        /// Selling price of a single product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal UnitPrice
        {
            get
            {
                return this._UnitPrice;
            }
            set
            {
                this.OnUnitPriceChanging(value);
                this.ReportPropertyChanging("UnitPrice");
                this._UnitPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UnitPrice");
                this.OnUnitPriceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _UnitPrice;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceChanged();
        /// <summary>
        /// Discount amount.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal UnitPriceDiscount
        {
            get
            {
                return this._UnitPriceDiscount;
            }
            set
            {
                this.OnUnitPriceDiscountChanging(value);
                this.ReportPropertyChanging("UnitPriceDiscount");
                this._UnitPriceDiscount = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("UnitPriceDiscount");
                this.OnUnitPriceDiscountChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _UnitPriceDiscount;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceDiscountChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitPriceDiscountChanged();
        /// <summary>
        /// Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal LineTotal
        {
            get
            {
                return this._LineTotal;
            }
            set
            {
                this.OnLineTotalChanging(value);
                this.ReportPropertyChanging("LineTotal");
                this._LineTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("LineTotal");
                this.OnLineTotalChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _LineTotal;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLineTotalChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnLineTotalChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SpecialOfferProductObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SpecialOfferProduct SpecialOfferProductObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOfferProduct>("AdvWorksModel.SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOfferProduct>("AdvWorksModel.SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SpecialOfferProductObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SpecialOfferProduct> SpecialOfferProductObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOfferProduct>("AdvWorksModel.SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SpecialOfferProduct>("AdvWorksModel.SalesOrderDetail_SpecialOfferProduct", "SpecialOfferProduct", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesOrderIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderDetail_SalesOrderId", "SalesOrderHeader")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesOrderHeader SalesOrderIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderDetail_SalesOrderId", "SalesOrderHeader").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderDetail_SalesOrderId", "SalesOrderHeader").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesOrderIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesOrderHeader> SalesOrderIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderDetail_SalesOrderId", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderDetail_SalesOrderId", "SalesOrderHeader", value);
                }
            }
        }
    }
    /// <summary>
    /// General sales order information.
    /// </summary>
    /// <KeyProperties>
    /// SalesOrderId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesOrderHeader")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesOrderHeader : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesOrderHeader object.
        /// </summary>
        /// <param name="salesOrderId">Initial value of SalesOrderId.</param>
        /// <param name="revisionNumber">Initial value of RevisionNumber.</param>
        /// <param name="orderDate">Initial value of OrderDate.</param>
        /// <param name="dueDate">Initial value of DueDate.</param>
        /// <param name="status">Initial value of Status.</param>
        /// <param name="onlineOrderFlag">Initial value of OnlineOrderFlag.</param>
        /// <param name="salesOrderNumber">Initial value of SalesOrderNumber.</param>
        /// <param name="subTotal">Initial value of SubTotal.</param>
        /// <param name="taxAmt">Initial value of TaxAmt.</param>
        /// <param name="freight">Initial value of Freight.</param>
        /// <param name="totalDue">Initial value of TotalDue.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesOrderHeader CreateSalesOrderHeader(int salesOrderId, byte revisionNumber, global::System.DateTime orderDate, global::System.DateTime dueDate, byte status, bool onlineOrderFlag, string salesOrderNumber, decimal subTotal, decimal taxAmt, decimal freight, decimal totalDue, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesOrderHeader salesOrderHeader = new SalesOrderHeader();
            salesOrderHeader.SalesOrderId = salesOrderId;
            salesOrderHeader.RevisionNumber = revisionNumber;
            salesOrderHeader.OrderDate = orderDate;
            salesOrderHeader.DueDate = dueDate;
            salesOrderHeader.Status = status;
            salesOrderHeader.OnlineOrderFlag = onlineOrderFlag;
            salesOrderHeader.SalesOrderNumber = salesOrderNumber;
            salesOrderHeader.SubTotal = subTotal;
            salesOrderHeader.TaxAmt = taxAmt;
            salesOrderHeader.Freight = freight;
            salesOrderHeader.TotalDue = totalDue;
            salesOrderHeader.Rowguid = rowguid;
            salesOrderHeader.ModifiedDate = modifiedDate;
            return salesOrderHeader;
        }
        /// <summary>
        /// There are no comments for property SalesOrderId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesOrderId
        {
            get
            {
                return this._SalesOrderId;
            }
            set
            {
                this.OnSalesOrderIdChanging(value);
                this.ReportPropertyChanging("SalesOrderId");
                this._SalesOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesOrderId");
                this.OnSalesOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanged();
        /// <summary>
        /// Incremental number to track changes to the sales order over time.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte RevisionNumber
        {
            get
            {
                return this._RevisionNumber;
            }
            set
            {
                this.OnRevisionNumberChanging(value);
                this.ReportPropertyChanging("RevisionNumber");
                this._RevisionNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("RevisionNumber");
                this.OnRevisionNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _RevisionNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionNumberChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRevisionNumberChanged();
        /// <summary>
        /// Dates the sales order was created.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime OrderDate
        {
            get
            {
                return this._OrderDate;
            }
            set
            {
                this.OnOrderDateChanging(value);
                this.ReportPropertyChanging("OrderDate");
                this._OrderDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderDate");
                this.OnOrderDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _OrderDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderDateChanged();
        /// <summary>
        /// Date the order is due to the customer.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime DueDate
        {
            get
            {
                return this._DueDate;
            }
            set
            {
                this.OnDueDateChanging(value);
                this.ReportPropertyChanging("DueDate");
                this._DueDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DueDate");
                this.OnDueDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _DueDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanged();
        /// <summary>
        /// Date the order was shipped to the customer.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> ShipDate
        {
            get
            {
                return this._ShipDate;
            }
            set
            {
                this.OnShipDateChanging(value);
                this.ReportPropertyChanging("ShipDate");
                this._ShipDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShipDate");
                this.OnShipDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _ShipDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipDateChanged();
        /// <summary>
        /// Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte Status
        {
            get
            {
                return this._Status;
            }
            set
            {
                this.OnStatusChanging(value);
                this.ReportPropertyChanging("Status");
                this._Status = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Status");
                this.OnStatusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _Status;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStatusChanged();
        /// <summary>
        /// 0 = Order placed by sales person. 1 = Order placed online by customer.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool OnlineOrderFlag
        {
            get
            {
                return this._OnlineOrderFlag;
            }
            set
            {
                this.OnOnlineOrderFlagChanging(value);
                this.ReportPropertyChanging("OnlineOrderFlag");
                this._OnlineOrderFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OnlineOrderFlag");
                this.OnOnlineOrderFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _OnlineOrderFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOnlineOrderFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOnlineOrderFlagChanged();
        /// <summary>
        /// Unique sales order identification number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string SalesOrderNumber
        {
            get
            {
                return this._SalesOrderNumber;
            }
            set
            {
                this.OnSalesOrderNumberChanging(value);
                this.ReportPropertyChanging("SalesOrderNumber");
                this._SalesOrderNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("SalesOrderNumber");
                this.OnSalesOrderNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _SalesOrderNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderNumberChanged();
        /// <summary>
        /// Customer purchase order number reference.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string PurchaseOrderNumber
        {
            get
            {
                return this._PurchaseOrderNumber;
            }
            set
            {
                this.OnPurchaseOrderNumberChanging(value);
                this.ReportPropertyChanging("PurchaseOrderNumber");
                this._PurchaseOrderNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("PurchaseOrderNumber");
                this.OnPurchaseOrderNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _PurchaseOrderNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchaseOrderNumberChanged();
        /// <summary>
        /// Financial accounting number reference.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AccountNumber
        {
            get
            {
                return this._AccountNumber;
            }
            set
            {
                this.OnAccountNumberChanging(value);
                this.ReportPropertyChanging("AccountNumber");
                this._AccountNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("AccountNumber");
                this.OnAccountNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AccountNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanged();
        /// <summary>
        /// Approval code provided by the credit card company.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CreditCardApprovalCode
        {
            get
            {
                return this._CreditCardApprovalCode;
            }
            set
            {
                this.OnCreditCardApprovalCodeChanging(value);
                this.ReportPropertyChanging("CreditCardApprovalCode");
                this._CreditCardApprovalCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("CreditCardApprovalCode");
                this.OnCreditCardApprovalCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CreditCardApprovalCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardApprovalCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditCardApprovalCodeChanged();
        /// <summary>
        /// Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SubTotal
        {
            get
            {
                return this._SubTotal;
            }
            set
            {
                this.OnSubTotalChanging(value);
                this.ReportPropertyChanging("SubTotal");
                this._SubTotal = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SubTotal");
                this.OnSubTotalChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SubTotal;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSubTotalChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSubTotalChanged();
        /// <summary>
        /// Tax amount.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal TaxAmt
        {
            get
            {
                return this._TaxAmt;
            }
            set
            {
                this.OnTaxAmtChanging(value);
                this.ReportPropertyChanging("TaxAmt");
                this._TaxAmt = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TaxAmt");
                this.OnTaxAmtChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _TaxAmt;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxAmtChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxAmtChanged();
        /// <summary>
        /// Shipping cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal Freight
        {
            get
            {
                return this._Freight;
            }
            set
            {
                this.OnFreightChanging(value);
                this.ReportPropertyChanging("Freight");
                this._Freight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Freight");
                this.OnFreightChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _Freight;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFreightChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnFreightChanged();
        /// <summary>
        /// Total due from customer. Computed as Subtotal + TaxAmt + Freight.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal TotalDue
        {
            get
            {
                return this._TotalDue;
            }
            set
            {
                this.OnTotalDueChanging(value);
                this.ReportPropertyChanging("TotalDue");
                this._TotalDue = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TotalDue");
                this.OnTotalDueChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _TotalDue;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTotalDueChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTotalDueChanged();
        /// <summary>
        /// Sales representative comments.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Comment
        {
            get
            {
                return this._Comment;
            }
            set
            {
                this.OnCommentChanging(value);
                this.ReportPropertyChanging("Comment");
                this._Comment = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Comment");
                this.OnCommentChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Comment;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommentChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommentChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_CustomerId", "Customer")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Customer CustomerIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.SalesOrderHeader_CustomerId", "Customer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.SalesOrderHeader_CustomerId", "Customer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Customer> CustomerIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.SalesOrderHeader_CustomerId", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Customer>("AdvWorksModel.SalesOrderHeader_CustomerId", "Customer", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_ContactId", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.SalesOrderHeader_ContactId", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.SalesOrderHeader_ContactId", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.SalesOrderHeader_ContactId", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.SalesOrderHeader_ContactId", "Contact", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_SalesPersonId", "SalesPerson")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesPerson SalesPersonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesOrderHeader_SalesPersonId", "SalesPerson").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesOrderHeader_SalesPersonId", "SalesPerson").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesPerson> SalesPersonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesOrderHeader_SalesPersonId", "SalesPerson");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesPerson>("AdvWorksModel.SalesOrderHeader_SalesPersonId", "SalesPerson", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_TerritoryId", "SalesTerritory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesTerritory TerritoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesOrderHeader_TerritoryId", "SalesTerritory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesOrderHeader_TerritoryId", "SalesTerritory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesTerritory> TerritoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesOrderHeader_TerritoryId", "SalesTerritory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesTerritory>("AdvWorksModel.SalesOrderHeader_TerritoryId", "SalesTerritory", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for BillToAddressIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_BillToAddressId", "Address")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Address BillToAddressIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_BillToAddressId", "Address").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_BillToAddressId", "Address").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for BillToAddressIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Address> BillToAddressIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_BillToAddressId", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_BillToAddressId", "Address", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ShipToAddressIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_ShipToAddressId", "Address")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Address ShipToAddressIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_ShipToAddressId", "Address").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_ShipToAddressId", "Address").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ShipToAddressIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Address> ShipToAddressIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_ShipToAddressId", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Address>("AdvWorksModel.SalesOrderHeader_ShipToAddressId", "Address", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ShipMethodIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_ShipMethodId", "ShipMethod")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ShipMethod ShipMethodIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.SalesOrderHeader_ShipMethodId", "ShipMethod").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.SalesOrderHeader_ShipMethodId", "ShipMethod").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ShipMethodIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ShipMethod> ShipMethodIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ShipMethod>("AdvWorksModel.SalesOrderHeader_ShipMethodId", "ShipMethod");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ShipMethod>("AdvWorksModel.SalesOrderHeader_ShipMethodId", "ShipMethod", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CreditCardIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_CreditCardId", "CreditCard")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public CreditCard CreditCardIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.SalesOrderHeader_CreditCardId", "CreditCard").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.SalesOrderHeader_CreditCardId", "CreditCard").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CreditCardIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<CreditCard> CreditCardIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CreditCard>("AdvWorksModel.SalesOrderHeader_CreditCardId", "CreditCard");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<CreditCard>("AdvWorksModel.SalesOrderHeader_CreditCardId", "CreditCard", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CurrencyRateIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeader_CurrencyRateId", "CurrencyRate")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public CurrencyRate CurrencyRateIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CurrencyRate>("AdvWorksModel.SalesOrderHeader_CurrencyRateId", "CurrencyRate").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CurrencyRate>("AdvWorksModel.SalesOrderHeader_CurrencyRateId", "CurrencyRate").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CurrencyRateIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<CurrencyRate> CurrencyRateIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CurrencyRate>("AdvWorksModel.SalesOrderHeader_CurrencyRateId", "CurrencyRate");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<CurrencyRate>("AdvWorksModel.SalesOrderHeader_CurrencyRateId", "CurrencyRate", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesReasonObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeaderSalesReason")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<SalesOrderHeaderSalesReason> SalesReasonObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<SalesOrderHeaderSalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeaderSalesReason");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<SalesOrderHeaderSalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeaderSalesReason", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping sales orders to sales reason codes.
    /// </summary>
    /// <KeyProperties>
    /// SalesOrderId
    /// SalesReasonId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesOrderHeaderSalesReason")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesOrderHeaderSalesReason : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesOrderHeaderSalesReason object.
        /// </summary>
        /// <param name="salesOrderId">Initial value of SalesOrderId.</param>
        /// <param name="salesReasonId">Initial value of SalesReasonId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesOrderHeaderSalesReason CreateSalesOrderHeaderSalesReason(int salesOrderId, int salesReasonId, global::System.DateTime modifiedDate)
        {
            SalesOrderHeaderSalesReason salesOrderHeaderSalesReason = new SalesOrderHeaderSalesReason();
            salesOrderHeaderSalesReason.SalesOrderId = salesOrderId;
            salesOrderHeaderSalesReason.SalesReasonId = salesReasonId;
            salesOrderHeaderSalesReason.ModifiedDate = modifiedDate;
            return salesOrderHeaderSalesReason;
        }
        /// <summary>
        /// There are no comments for property SalesOrderId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesOrderId
        {
            get
            {
                return this._SalesOrderId;
            }
            set
            {
                this.OnSalesOrderIdChanging(value);
                this.ReportPropertyChanging("SalesOrderId");
                this._SalesOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesOrderId");
                this.OnSalesOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesOrderIdChanged();
        /// <summary>
        /// There are no comments for property SalesReasonId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesReasonId
        {
            get
            {
                return this._SalesReasonId;
            }
            set
            {
                this.OnSalesReasonIdChanging(value);
                this.ReportPropertyChanging("SalesReasonId");
                this._SalesReasonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesReasonId");
                this.OnSalesReasonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesReasonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesReasonIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesReasonIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SalesOrderHeaderObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesOrderHeader SalesOrderHeaderObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesOrderHeaderObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesOrderHeader> SalesOrderHeaderObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesOrderHeader>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesOrderHeader", "SalesOrderHeader", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesReasonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesReason SalesReasonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesReasonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesReason> SalesReasonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesReason>("AdvWorksModel.SalesOrderHeaderSalesReason_SalesReasonId", "SalesReason", value);
                }
            }
        }
    }
    /// <summary>
    /// Sales representative current information.
    /// </summary>
    /// <KeyProperties>
    /// SalesPersonId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesPerson")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesPerson : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesPerson object.
        /// </summary>
        /// <param name="salesPersonId">Initial value of SalesPersonId.</param>
        /// <param name="bonus">Initial value of Bonus.</param>
        /// <param name="commissionPct">Initial value of CommissionPct.</param>
        /// <param name="salesYtd">Initial value of SalesYtd.</param>
        /// <param name="salesLastYear">Initial value of SalesLastYear.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesPerson CreateSalesPerson(int salesPersonId, decimal bonus, decimal commissionPct, decimal salesYtd, decimal salesLastYear, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesPerson salesPerson = new SalesPerson();
            salesPerson.SalesPersonId = salesPersonId;
            salesPerson.Bonus = bonus;
            salesPerson.CommissionPct = commissionPct;
            salesPerson.SalesYtd = salesYtd;
            salesPerson.SalesLastYear = salesLastYear;
            salesPerson.Rowguid = rowguid;
            salesPerson.ModifiedDate = modifiedDate;
            return salesPerson;
        }
        /// <summary>
        /// There are no comments for property SalesPersonId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesPersonId
        {
            get
            {
                return this._SalesPersonId;
            }
            set
            {
                this.OnSalesPersonIdChanging(value);
                this.ReportPropertyChanging("SalesPersonId");
                this._SalesPersonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesPersonId");
                this.OnSalesPersonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesPersonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanged();
        /// <summary>
        /// Projected yearly sales.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<decimal> SalesQuota
        {
            get
            {
                return this._SalesQuota;
            }
            set
            {
                this.OnSalesQuotaChanging(value);
                this.ReportPropertyChanging("SalesQuota");
                this._SalesQuota = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesQuota");
                this.OnSalesQuotaChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<decimal> _SalesQuota;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesQuotaChanging(global::System.Nullable<decimal> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesQuotaChanged();
        /// <summary>
        /// Bonus due if quota is met.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal Bonus
        {
            get
            {
                return this._Bonus;
            }
            set
            {
                this.OnBonusChanging(value);
                this.ReportPropertyChanging("Bonus");
                this._Bonus = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Bonus");
                this.OnBonusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _Bonus;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBonusChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnBonusChanged();
        /// <summary>
        /// Commision percent received per sale.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal CommissionPct
        {
            get
            {
                return this._CommissionPct;
            }
            set
            {
                this.OnCommissionPctChanging(value);
                this.ReportPropertyChanging("CommissionPct");
                this._CommissionPct = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CommissionPct");
                this.OnCommissionPctChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _CommissionPct;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommissionPctChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCommissionPctChanged();
        /// <summary>
        /// Sales total year to date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SalesYtd
        {
            get
            {
                return this._SalesYtd;
            }
            set
            {
                this.OnSalesYtdChanging(value);
                this.ReportPropertyChanging("SalesYtd");
                this._SalesYtd = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesYtd");
                this.OnSalesYtdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SalesYtd;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesYtdChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesYtdChanged();
        /// <summary>
        /// Sales total of previous year.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SalesLastYear
        {
            get
            {
                return this._SalesLastYear;
            }
            set
            {
                this.OnSalesLastYearChanging(value);
                this.ReportPropertyChanging("SalesLastYear");
                this._SalesLastYear = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesLastYear");
                this.OnSalesLastYearChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SalesLastYear;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesLastYearChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesLastYearChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesPerson_SalesPersonId", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee SalesPersonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPerson_SalesPersonId", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPerson_SalesPersonId", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> SalesPersonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPerson_SalesPersonId", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.SalesPerson_SalesPersonId", "Employee", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesPerson_TerritoryId", "SalesTerritory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesTerritory TerritoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesPerson_TerritoryId", "SalesTerritory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesPerson_TerritoryId", "SalesTerritory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesTerritory> TerritoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesPerson_TerritoryId", "SalesTerritory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesTerritory>("AdvWorksModel.SalesPerson_TerritoryId", "SalesTerritory", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for QuotaHistoryObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesPersonQuotaHistory_SalesPerson", "SalesPersonQuotaHistory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<SalesPersonQuotaHistory> QuotaHistoryObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<SalesPersonQuotaHistory>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPersonQuotaHistory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<SalesPersonQuotaHistory>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPersonQuotaHistory", value);
                }
            }
        }
    }
    /// <summary>
    /// Sales performance tracking.
    /// </summary>
    /// <KeyProperties>
    /// SalesPersonId
    /// QuotaDate
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesPersonQuotaHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesPersonQuotaHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesPersonQuotaHistory object.
        /// </summary>
        /// <param name="salesPersonId">Initial value of SalesPersonId.</param>
        /// <param name="quotaDate">Initial value of QuotaDate.</param>
        /// <param name="salesQuota">Initial value of SalesQuota.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesPersonQuotaHistory CreateSalesPersonQuotaHistory(int salesPersonId, global::System.DateTime quotaDate, decimal salesQuota, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesPersonQuotaHistory salesPersonQuotaHistory = new SalesPersonQuotaHistory();
            salesPersonQuotaHistory.SalesPersonId = salesPersonId;
            salesPersonQuotaHistory.QuotaDate = quotaDate;
            salesPersonQuotaHistory.SalesQuota = salesQuota;
            salesPersonQuotaHistory.Rowguid = rowguid;
            salesPersonQuotaHistory.ModifiedDate = modifiedDate;
            return salesPersonQuotaHistory;
        }
        /// <summary>
        /// There are no comments for property SalesPersonId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesPersonId
        {
            get
            {
                return this._SalesPersonId;
            }
            set
            {
                this.OnSalesPersonIdChanging(value);
                this.ReportPropertyChanging("SalesPersonId");
                this._SalesPersonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesPersonId");
                this.OnSalesPersonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesPersonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanged();
        /// <summary>
        /// There are no comments for property QuotaDate in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime QuotaDate
        {
            get
            {
                return this._QuotaDate;
            }
            set
            {
                this.OnQuotaDateChanging(value);
                this.ReportPropertyChanging("QuotaDate");
                this._QuotaDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("QuotaDate");
                this.OnQuotaDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _QuotaDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuotaDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuotaDateChanged();
        /// <summary>
        /// Sales quota amount.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SalesQuota
        {
            get
            {
                return this._SalesQuota;
            }
            set
            {
                this.OnSalesQuotaChanging(value);
                this.ReportPropertyChanging("SalesQuota");
                this._SalesQuota = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesQuota");
                this.OnSalesQuotaChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SalesQuota;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesQuotaChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesQuotaChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SalesPersonObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesPersonQuotaHistory_SalesPerson", "SalesPerson")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesPerson SalesPersonObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPerson").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPerson").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesPerson> SalesPersonObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPerson");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesPerson>("AdvWorksModel.SalesPersonQuotaHistory_SalesPerson", "SalesPerson", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesPersonQuotaHistory_SalesPersonId", "Employee")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Employee SalesPersonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPersonQuotaHistory_SalesPersonId", "Employee").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPersonQuotaHistory_SalesPersonId", "Employee").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Employee> SalesPersonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Employee>("AdvWorksModel.SalesPersonQuotaHistory_SalesPersonId", "Employee");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Employee>("AdvWorksModel.SalesPersonQuotaHistory_SalesPersonId", "Employee", value);
                }
            }
        }
    }
    /// <summary>
    /// Lookup table of customer purchase reasons.
    /// </summary>
    /// <KeyProperties>
    /// SalesReasonId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesReason")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesReason : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesReason object.
        /// </summary>
        /// <param name="salesReasonId">Initial value of SalesReasonId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="reasonType">Initial value of ReasonType.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesReason CreateSalesReason(int salesReasonId, string name, string reasonType, global::System.DateTime modifiedDate)
        {
            SalesReason salesReason = new SalesReason();
            salesReason.SalesReasonId = salesReasonId;
            salesReason.Name = name;
            salesReason.ReasonType = reasonType;
            salesReason.ModifiedDate = modifiedDate;
            return salesReason;
        }
        /// <summary>
        /// There are no comments for property SalesReasonId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesReasonId
        {
            get
            {
                return this._SalesReasonId;
            }
            set
            {
                this.OnSalesReasonIdChanging(value);
                this.ReportPropertyChanging("SalesReasonId");
                this._SalesReasonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesReasonId");
                this.OnSalesReasonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesReasonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesReasonIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesReasonIdChanged();
        /// <summary>
        /// Sales reason description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Category the sales reason belongs to.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ReasonType
        {
            get
            {
                return this._ReasonType;
            }
            set
            {
                this.OnReasonTypeChanging(value);
                this.ReportPropertyChanging("ReasonType");
                this._ReasonType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ReasonType");
                this.OnReasonTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ReasonType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReasonTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReasonTypeChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Tax rate lookup table.
    /// </summary>
    /// <KeyProperties>
    /// SalesTaxRateId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesTaxRate")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesTaxRate : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesTaxRate object.
        /// </summary>
        /// <param name="salesTaxRateId">Initial value of SalesTaxRateId.</param>
        /// <param name="taxType">Initial value of TaxType.</param>
        /// <param name="taxRate">Initial value of TaxRate.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesTaxRate CreateSalesTaxRate(int salesTaxRateId, byte taxType, decimal taxRate, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesTaxRate salesTaxRate = new SalesTaxRate();
            salesTaxRate.SalesTaxRateId = salesTaxRateId;
            salesTaxRate.TaxType = taxType;
            salesTaxRate.TaxRate = taxRate;
            salesTaxRate.Name = name;
            salesTaxRate.Rowguid = rowguid;
            salesTaxRate.ModifiedDate = modifiedDate;
            return salesTaxRate;
        }
        /// <summary>
        /// There are no comments for property SalesTaxRateId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesTaxRateId
        {
            get
            {
                return this._SalesTaxRateId;
            }
            set
            {
                this.OnSalesTaxRateIdChanging(value);
                this.ReportPropertyChanging("SalesTaxRateId");
                this._SalesTaxRateId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesTaxRateId");
                this.OnSalesTaxRateIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesTaxRateId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesTaxRateIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesTaxRateIdChanged();
        /// <summary>
        /// 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte TaxType
        {
            get
            {
                return this._TaxType;
            }
            set
            {
                this.OnTaxTypeChanging(value);
                this.ReportPropertyChanging("TaxType");
                this._TaxType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TaxType");
                this.OnTaxTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _TaxType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxTypeChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxTypeChanged();
        /// <summary>
        /// Tax rate amount.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal TaxRate
        {
            get
            {
                return this._TaxRate;
            }
            set
            {
                this.OnTaxRateChanging(value);
                this.ReportPropertyChanging("TaxRate");
                this._TaxRate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TaxRate");
                this.OnTaxRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _TaxRate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTaxRateChanged();
        /// <summary>
        /// Tax rate description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for StateProvinceIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesTaxRate_StateProvinceId", "StateProvince")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public StateProvince StateProvinceIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.SalesTaxRate_StateProvinceId", "StateProvince").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.SalesTaxRate_StateProvinceId", "StateProvince").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for StateProvinceIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<StateProvince> StateProvinceIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<StateProvince>("AdvWorksModel.SalesTaxRate_StateProvinceId", "StateProvince");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<StateProvince>("AdvWorksModel.SalesTaxRate_StateProvinceId", "StateProvince", value);
                }
            }
        }
    }
    /// <summary>
    /// Sales territory lookup table.
    /// </summary>
    /// <KeyProperties>
    /// TerritoryId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesTerritory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesTerritory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesTerritory object.
        /// </summary>
        /// <param name="territoryId">Initial value of TerritoryId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="countryRegionCode">Initial value of CountryRegionCode.</param>
        /// <param name="group">Initial value of Group.</param>
        /// <param name="salesYtd">Initial value of SalesYtd.</param>
        /// <param name="salesLastYear">Initial value of SalesLastYear.</param>
        /// <param name="costYtd">Initial value of CostYtd.</param>
        /// <param name="costLastYear">Initial value of CostLastYear.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesTerritory CreateSalesTerritory(int territoryId, string name, string countryRegionCode, string group, decimal salesYtd, decimal salesLastYear, decimal costYtd, decimal costLastYear, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesTerritory salesTerritory = new SalesTerritory();
            salesTerritory.TerritoryId = territoryId;
            salesTerritory.Name = name;
            salesTerritory.CountryRegionCode = countryRegionCode;
            salesTerritory.Group = group;
            salesTerritory.SalesYtd = salesYtd;
            salesTerritory.SalesLastYear = salesLastYear;
            salesTerritory.CostYtd = costYtd;
            salesTerritory.CostLastYear = costLastYear;
            salesTerritory.Rowguid = rowguid;
            salesTerritory.ModifiedDate = modifiedDate;
            return salesTerritory;
        }
        /// <summary>
        /// There are no comments for property TerritoryId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int TerritoryId
        {
            get
            {
                return this._TerritoryId;
            }
            set
            {
                this.OnTerritoryIdChanging(value);
                this.ReportPropertyChanging("TerritoryId");
                this._TerritoryId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TerritoryId");
                this.OnTerritoryIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _TerritoryId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTerritoryIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTerritoryIdChanged();
        /// <summary>
        /// Sales territory description
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string CountryRegionCode
        {
            get
            {
                return this._CountryRegionCode;
            }
            set
            {
                this.OnCountryRegionCodeChanging(value);
                this.ReportPropertyChanging("CountryRegionCode");
                this._CountryRegionCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("CountryRegionCode");
                this.OnCountryRegionCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _CountryRegionCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCountryRegionCodeChanged();
        /// <summary>
        /// Geographic area to which the sales territory belong.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Group
        {
            get
            {
                return this._Group;
            }
            set
            {
                this.OnGroupChanging(value);
                this.ReportPropertyChanging("Group");
                this._Group = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Group");
                this.OnGroupChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Group;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGroupChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnGroupChanged();
        /// <summary>
        /// Sales in the territory year to date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SalesYtd
        {
            get
            {
                return this._SalesYtd;
            }
            set
            {
                this.OnSalesYtdChanging(value);
                this.ReportPropertyChanging("SalesYtd");
                this._SalesYtd = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesYtd");
                this.OnSalesYtdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SalesYtd;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesYtdChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesYtdChanged();
        /// <summary>
        /// Sales in the territory the previous year.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal SalesLastYear
        {
            get
            {
                return this._SalesLastYear;
            }
            set
            {
                this.OnSalesLastYearChanging(value);
                this.ReportPropertyChanging("SalesLastYear");
                this._SalesLastYear = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesLastYear");
                this.OnSalesLastYearChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _SalesLastYear;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesLastYearChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesLastYearChanged();
        /// <summary>
        /// Business costs in the territory year to date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal CostYtd
        {
            get
            {
                return this._CostYtd;
            }
            set
            {
                this.OnCostYtdChanging(value);
                this.ReportPropertyChanging("CostYtd");
                this._CostYtd = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CostYtd");
                this.OnCostYtdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _CostYtd;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostYtdChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostYtdChanged();
        /// <summary>
        /// Business costs in the territory the previous year.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal CostLastYear
        {
            get
            {
                return this._CostLastYear;
            }
            set
            {
                this.OnCostLastYearChanging(value);
                this.ReportPropertyChanging("CostLastYear");
                this._CostLastYear = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CostLastYear");
                this.OnCostLastYearChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _CostLastYear;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostLastYearChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCostLastYearChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Sales representative transfers to other sales territories.
    /// </summary>
    /// <KeyProperties>
    /// SalesPersonId
    /// StartDate
    /// TerritoryId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SalesTerritoryHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SalesTerritoryHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SalesTerritoryHistory object.
        /// </summary>
        /// <param name="salesPersonId">Initial value of SalesPersonId.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="territoryId">Initial value of TerritoryId.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SalesTerritoryHistory CreateSalesTerritoryHistory(int salesPersonId, global::System.DateTime startDate, int territoryId, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SalesTerritoryHistory salesTerritoryHistory = new SalesTerritoryHistory();
            salesTerritoryHistory.SalesPersonId = salesPersonId;
            salesTerritoryHistory.StartDate = startDate;
            salesTerritoryHistory.TerritoryId = territoryId;
            salesTerritoryHistory.Rowguid = rowguid;
            salesTerritoryHistory.ModifiedDate = modifiedDate;
            return salesTerritoryHistory;
        }
        /// <summary>
        /// Primary key for SalesTerritoryHistory records.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SalesPersonId
        {
            get
            {
                return this._SalesPersonId;
            }
            set
            {
                this.OnSalesPersonIdChanging(value);
                this.ReportPropertyChanging("SalesPersonId");
                this._SalesPersonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SalesPersonId");
                this.OnSalesPersonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SalesPersonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSalesPersonIdChanged();
        /// <summary>
        /// Date the sales representive started work in the territory.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int TerritoryId
        {
            get
            {
                return this._TerritoryId;
            }
            set
            {
                this.OnTerritoryIdChanging(value);
                this.ReportPropertyChanging("TerritoryId");
                this._TerritoryId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TerritoryId");
                this.OnTerritoryIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _TerritoryId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTerritoryIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTerritoryIdChanged();
        /// <summary>
        /// Date the sales representative left work in the territory.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesTerritoryHistory_SalesPersonId", "SalesPerson")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesPerson SalesPersonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesTerritoryHistory_SalesPersonId", "SalesPerson").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesTerritoryHistory_SalesPersonId", "SalesPerson").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesPerson> SalesPersonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.SalesTerritoryHistory_SalesPersonId", "SalesPerson");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesPerson>("AdvWorksModel.SalesTerritoryHistory_SalesPersonId", "SalesPerson", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SalesTerritoryHistory_TerritoryId", "SalesTerritory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesTerritory TerritoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesTerritoryHistory_TerritoryId", "SalesTerritory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesTerritoryHistory_TerritoryId", "SalesTerritory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesTerritory> TerritoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.SalesTerritoryHistory_TerritoryId", "SalesTerritory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesTerritory>("AdvWorksModel.SalesTerritoryHistory_TerritoryId", "SalesTerritory", value);
                }
            }
        }
    }
    /// <summary>
    /// Manufacturing failure reasons lookup table.
    /// </summary>
    /// <KeyProperties>
    /// ScrapReasonId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ScrapReason")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ScrapReason : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ScrapReason object.
        /// </summary>
        /// <param name="scrapReasonId">Initial value of ScrapReasonId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ScrapReason CreateScrapReason(short scrapReasonId, string name, global::System.DateTime modifiedDate)
        {
            ScrapReason scrapReason = new ScrapReason();
            scrapReason.ScrapReasonId = scrapReasonId;
            scrapReason.Name = name;
            scrapReason.ModifiedDate = modifiedDate;
            return scrapReason;
        }
        /// <summary>
        /// There are no comments for property ScrapReasonId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short ScrapReasonId
        {
            get
            {
                return this._ScrapReasonId;
            }
            set
            {
                this.OnScrapReasonIdChanging(value);
                this.ReportPropertyChanging("ScrapReasonId");
                this._ScrapReasonId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ScrapReasonId");
                this.OnScrapReasonIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _ScrapReasonId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScrapReasonIdChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScrapReasonIdChanged();
        /// <summary>
        /// Failure description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Work shift lookup table.
    /// </summary>
    /// <KeyProperties>
    /// ShiftId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Shift")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Shift : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Shift object.
        /// </summary>
        /// <param name="shiftId">Initial value of ShiftId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="startTime">Initial value of StartTime.</param>
        /// <param name="endTime">Initial value of EndTime.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Shift CreateShift(byte shiftId, string name, global::System.DateTime startTime, global::System.DateTime endTime, global::System.DateTime modifiedDate)
        {
            Shift shift = new Shift();
            shift.ShiftId = shiftId;
            shift.Name = name;
            shift.StartTime = startTime;
            shift.EndTime = endTime;
            shift.ModifiedDate = modifiedDate;
            return shift;
        }
        /// <summary>
        /// There are no comments for property ShiftId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte ShiftId
        {
            get
            {
                return this._ShiftId;
            }
            set
            {
                this.OnShiftIdChanging(value);
                this.ReportPropertyChanging("ShiftId");
                this._ShiftId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShiftId");
                this.OnShiftIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _ShiftId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShiftIdChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShiftIdChanged();
        /// <summary>
        /// Shift description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Shift start time.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartTime
        {
            get
            {
                return this._StartTime;
            }
            set
            {
                this.OnStartTimeChanging(value);
                this.ReportPropertyChanging("StartTime");
                this._StartTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartTime");
                this.OnStartTimeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartTime;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartTimeChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartTimeChanged();
        /// <summary>
        /// Shift end time.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime EndTime
        {
            get
            {
                return this._EndTime;
            }
            set
            {
                this.OnEndTimeChanging(value);
                this.ReportPropertyChanging("EndTime");
                this._EndTime = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndTime");
                this.OnEndTimeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _EndTime;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndTimeChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndTimeChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Shipping company lookup table.
    /// </summary>
    /// <KeyProperties>
    /// ShipMethodId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ShipMethod")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ShipMethod : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ShipMethod object.
        /// </summary>
        /// <param name="shipMethodId">Initial value of ShipMethodId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="shipBase">Initial value of ShipBase.</param>
        /// <param name="shipRate">Initial value of ShipRate.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ShipMethod CreateShipMethod(int shipMethodId, string name, decimal shipBase, decimal shipRate, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            ShipMethod shipMethod = new ShipMethod();
            shipMethod.ShipMethodId = shipMethodId;
            shipMethod.Name = name;
            shipMethod.ShipBase = shipBase;
            shipMethod.ShipRate = shipRate;
            shipMethod.Rowguid = rowguid;
            shipMethod.ModifiedDate = modifiedDate;
            return shipMethod;
        }
        /// <summary>
        /// There are no comments for property ShipMethodId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ShipMethodId
        {
            get
            {
                return this._ShipMethodId;
            }
            set
            {
                this.OnShipMethodIdChanging(value);
                this.ReportPropertyChanging("ShipMethodId");
                this._ShipMethodId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShipMethodId");
                this.OnShipMethodIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ShipMethodId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipMethodIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipMethodIdChanged();
        /// <summary>
        /// Shipping company name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Minimum shipping charge.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ShipBase
        {
            get
            {
                return this._ShipBase;
            }
            set
            {
                this.OnShipBaseChanging(value);
                this.ReportPropertyChanging("ShipBase");
                this._ShipBase = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShipBase");
                this.OnShipBaseChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ShipBase;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipBaseChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipBaseChanged();
        /// <summary>
        /// Shipping charge per pound.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ShipRate
        {
            get
            {
                return this._ShipRate;
            }
            set
            {
                this.OnShipRateChanging(value);
                this.ReportPropertyChanging("ShipRate");
                this._ShipRate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShipRate");
                this.OnShipRateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ShipRate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipRateChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShipRateChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Contains online customer orders until the order is submitted or cancelled.
    /// </summary>
    /// <KeyProperties>
    /// ShoppingCartItemId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="ShoppingCartItem")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class ShoppingCartItem : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new ShoppingCartItem object.
        /// </summary>
        /// <param name="shoppingCartItemId">Initial value of ShoppingCartItemId.</param>
        /// <param name="shoppingCartId">Initial value of ShoppingCartId.</param>
        /// <param name="quantity">Initial value of Quantity.</param>
        /// <param name="dateCreated">Initial value of DateCreated.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static ShoppingCartItem CreateShoppingCartItem(int shoppingCartItemId, string shoppingCartId, int quantity, global::System.DateTime dateCreated, global::System.DateTime modifiedDate)
        {
            ShoppingCartItem shoppingCartItem = new ShoppingCartItem();
            shoppingCartItem.ShoppingCartItemId = shoppingCartItemId;
            shoppingCartItem.ShoppingCartId = shoppingCartId;
            shoppingCartItem.Quantity = quantity;
            shoppingCartItem.DateCreated = dateCreated;
            shoppingCartItem.ModifiedDate = modifiedDate;
            return shoppingCartItem;
        }
        /// <summary>
        /// There are no comments for property ShoppingCartItemId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ShoppingCartItemId
        {
            get
            {
                return this._ShoppingCartItemId;
            }
            set
            {
                this.OnShoppingCartItemIdChanging(value);
                this.ReportPropertyChanging("ShoppingCartItemId");
                this._ShoppingCartItemId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ShoppingCartItemId");
                this.OnShoppingCartItemIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ShoppingCartItemId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShoppingCartItemIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShoppingCartItemIdChanged();
        /// <summary>
        /// Shopping cart identification number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string ShoppingCartId
        {
            get
            {
                return this._ShoppingCartId;
            }
            set
            {
                this.OnShoppingCartIdChanging(value);
                this.ReportPropertyChanging("ShoppingCartId");
                this._ShoppingCartId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("ShoppingCartId");
                this.OnShoppingCartIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _ShoppingCartId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShoppingCartIdChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnShoppingCartIdChanged();
        /// <summary>
        /// Product quantity ordered.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int Quantity
        {
            get
            {
                return this._Quantity;
            }
            set
            {
                this.OnQuantityChanging(value);
                this.ReportPropertyChanging("Quantity");
                this._Quantity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Quantity");
                this.OnQuantityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _Quantity;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanged();
        /// <summary>
        /// Date the time the record was created.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime DateCreated
        {
            get
            {
                return this._DateCreated;
            }
            set
            {
                this.OnDateCreatedChanging(value);
                this.ReportPropertyChanging("DateCreated");
                this._DateCreated = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DateCreated");
                this.OnDateCreatedChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _DateCreated;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDateCreatedChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDateCreatedChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "ShoppingCartItem_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ShoppingCartItem_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ShoppingCartItem_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.ShoppingCartItem_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.ShoppingCartItem_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// Sale discounts lookup table.
    /// </summary>
    /// <KeyProperties>
    /// SpecialOfferId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SpecialOffer")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SpecialOffer : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SpecialOffer object.
        /// </summary>
        /// <param name="specialOfferId">Initial value of SpecialOfferId.</param>
        /// <param name="description">Initial value of Description.</param>
        /// <param name="discountPct">Initial value of DiscountPct.</param>
        /// <param name="type">Initial value of Type.</param>
        /// <param name="category">Initial value of Category.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="endDate">Initial value of EndDate.</param>
        /// <param name="minQty">Initial value of MinQty.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SpecialOffer CreateSpecialOffer(int specialOfferId, string description, decimal discountPct, string type, string category, global::System.DateTime startDate, global::System.DateTime endDate, int minQty, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SpecialOffer specialOffer = new SpecialOffer();
            specialOffer.SpecialOfferId = specialOfferId;
            specialOffer.Description = description;
            specialOffer.DiscountPct = discountPct;
            specialOffer.Type = type;
            specialOffer.Category = category;
            specialOffer.StartDate = startDate;
            specialOffer.EndDate = endDate;
            specialOffer.MinQty = minQty;
            specialOffer.Rowguid = rowguid;
            specialOffer.ModifiedDate = modifiedDate;
            return specialOffer;
        }
        /// <summary>
        /// There are no comments for property SpecialOfferId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SpecialOfferId
        {
            get
            {
                return this._SpecialOfferId;
            }
            set
            {
                this.OnSpecialOfferIdChanging(value);
                this.ReportPropertyChanging("SpecialOfferId");
                this._SpecialOfferId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SpecialOfferId");
                this.OnSpecialOfferIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SpecialOfferId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSpecialOfferIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSpecialOfferIdChanged();
        /// <summary>
        /// Discount description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Description
        {
            get
            {
                return this._Description;
            }
            set
            {
                this.OnDescriptionChanging(value);
                this.ReportPropertyChanging("Description");
                this._Description = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Description");
                this.OnDescriptionChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Description;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDescriptionChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDescriptionChanged();
        /// <summary>
        /// Discount precentage.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal DiscountPct
        {
            get
            {
                return this._DiscountPct;
            }
            set
            {
                this.OnDiscountPctChanging(value);
                this.ReportPropertyChanging("DiscountPct");
                this._DiscountPct = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DiscountPct");
                this.OnDiscountPctChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _DiscountPct;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiscountPctChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDiscountPctChanged();
        /// <summary>
        /// Discount type category.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Type
        {
            get
            {
                return this._Type;
            }
            set
            {
                this.OnTypeChanging(value);
                this.ReportPropertyChanging("Type");
                this._Type = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Type");
                this.OnTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Type;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTypeChanged();
        /// <summary>
        /// Group the discount applies to such as Reseller or Customer.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Category
        {
            get
            {
                return this._Category;
            }
            set
            {
                this.OnCategoryChanging(value);
                this.ReportPropertyChanging("Category");
                this._Category = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Category");
                this.OnCategoryChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Category;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCategoryChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCategoryChanged();
        /// <summary>
        /// Discount start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Discount end date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Minimum discount percent allowed.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int MinQty
        {
            get
            {
                return this._MinQty;
            }
            set
            {
                this.OnMinQtyChanging(value);
                this.ReportPropertyChanging("MinQty");
                this._MinQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("MinQty");
                this.OnMinQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _MinQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMinQtyChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMinQtyChanged();
        /// <summary>
        /// Maximum discount percent allowed.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<int> MaxQty
        {
            get
            {
                return this._MaxQty;
            }
            set
            {
                this.OnMaxQtyChanging(value);
                this.ReportPropertyChanging("MaxQty");
                this._MaxQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("MaxQty");
                this.OnMaxQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<int> _MaxQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaxQtyChanging(global::System.Nullable<int> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnMaxQtyChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Cross-reference table mapping products to special offer discounts.
    /// </summary>
    /// <KeyProperties>
    /// SpecialOfferId
    /// ProductId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="SpecialOfferProduct")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class SpecialOfferProduct : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new SpecialOfferProduct object.
        /// </summary>
        /// <param name="specialOfferId">Initial value of SpecialOfferId.</param>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static SpecialOfferProduct CreateSpecialOfferProduct(int specialOfferId, int productId, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            SpecialOfferProduct specialOfferProduct = new SpecialOfferProduct();
            specialOfferProduct.SpecialOfferId = specialOfferId;
            specialOfferProduct.ProductId = productId;
            specialOfferProduct.Rowguid = rowguid;
            specialOfferProduct.ModifiedDate = modifiedDate;
            return specialOfferProduct;
        }
        /// <summary>
        /// Primary key for SpecialOfferProduct records.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int SpecialOfferId
        {
            get
            {
                return this._SpecialOfferId;
            }
            set
            {
                this.OnSpecialOfferIdChanging(value);
                this.ReportPropertyChanging("SpecialOfferId");
                this._SpecialOfferId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("SpecialOfferId");
                this.OnSpecialOfferIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _SpecialOfferId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSpecialOfferIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnSpecialOfferIdChanged();
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for SpecialOfferIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SpecialOfferProduct_SpecialOfferId", "SpecialOffer")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SpecialOffer SpecialOfferIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOffer>("AdvWorksModel.SpecialOfferProduct_SpecialOfferId", "SpecialOffer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOffer>("AdvWorksModel.SpecialOfferProduct_SpecialOfferId", "SpecialOffer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SpecialOfferIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SpecialOffer> SpecialOfferIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SpecialOffer>("AdvWorksModel.SpecialOfferProduct_SpecialOfferId", "SpecialOffer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SpecialOffer>("AdvWorksModel.SpecialOfferProduct_SpecialOfferId", "SpecialOffer", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "SpecialOfferProduct_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.SpecialOfferProduct_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.SpecialOfferProduct_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.SpecialOfferProduct_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.SpecialOfferProduct_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// State and province lookup table.
    /// </summary>
    /// <KeyProperties>
    /// StateProvinceId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="StateProvince")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class StateProvince : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new StateProvince object.
        /// </summary>
        /// <param name="stateProvinceId">Initial value of StateProvinceId.</param>
        /// <param name="stateProvinceCode">Initial value of StateProvinceCode.</param>
        /// <param name="isOnlyStateProvinceFlag">Initial value of IsOnlyStateProvinceFlag.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static StateProvince CreateStateProvince(int stateProvinceId, string stateProvinceCode, bool isOnlyStateProvinceFlag, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            StateProvince stateProvince = new StateProvince();
            stateProvince.StateProvinceId = stateProvinceId;
            stateProvince.StateProvinceCode = stateProvinceCode;
            stateProvince.IsOnlyStateProvinceFlag = isOnlyStateProvinceFlag;
            stateProvince.Name = name;
            stateProvince.Rowguid = rowguid;
            stateProvince.ModifiedDate = modifiedDate;
            return stateProvince;
        }
        /// <summary>
        /// There are no comments for property StateProvinceId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int StateProvinceId
        {
            get
            {
                return this._StateProvinceId;
            }
            set
            {
                this.OnStateProvinceIdChanging(value);
                this.ReportPropertyChanging("StateProvinceId");
                this._StateProvinceId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StateProvinceId");
                this.OnStateProvinceIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _StateProvinceId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStateProvinceIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStateProvinceIdChanged();
        /// <summary>
        /// ISO standard state or province code.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string StateProvinceCode
        {
            get
            {
                return this._StateProvinceCode;
            }
            set
            {
                this.OnStateProvinceCodeChanging(value);
                this.ReportPropertyChanging("StateProvinceCode");
                this._StateProvinceCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("StateProvinceCode");
                this.OnStateProvinceCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _StateProvinceCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStateProvinceCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStateProvinceCodeChanged();
        /// <summary>
        /// 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool IsOnlyStateProvinceFlag
        {
            get
            {
                return this._IsOnlyStateProvinceFlag;
            }
            set
            {
                this.OnIsOnlyStateProvinceFlagChanging(value);
                this.ReportPropertyChanging("IsOnlyStateProvinceFlag");
                this._IsOnlyStateProvinceFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("IsOnlyStateProvinceFlag");
                this.OnIsOnlyStateProvinceFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _IsOnlyStateProvinceFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIsOnlyStateProvinceFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnIsOnlyStateProvinceFlagChanged();
        /// <summary>
        /// State or province description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for CountryRegionCodeObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "StateProvince_CountryRegionCode", "CountryRegion")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public CountryRegion CountryRegionCodeObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.StateProvince_CountryRegionCode", "CountryRegion").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.StateProvince_CountryRegionCode", "CountryRegion").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CountryRegionCodeObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<CountryRegion> CountryRegionCodeObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<CountryRegion>("AdvWorksModel.StateProvince_CountryRegionCode", "CountryRegion");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<CountryRegion>("AdvWorksModel.StateProvince_CountryRegionCode", "CountryRegion", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "StateProvince_TerritoryId", "SalesTerritory")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesTerritory TerritoryIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.StateProvince_TerritoryId", "SalesTerritory").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.StateProvince_TerritoryId", "SalesTerritory").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for TerritoryIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesTerritory> TerritoryIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesTerritory>("AdvWorksModel.StateProvince_TerritoryId", "SalesTerritory");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesTerritory>("AdvWorksModel.StateProvince_TerritoryId", "SalesTerritory", value);
                }
            }
        }
    }
    /// <summary>
    /// Customers (resellers) of Adventure Works products.
    /// </summary>
    /// <KeyProperties>
    /// CustomerId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Store")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Store : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Store object.
        /// </summary>
        /// <param name="customerId">Initial value of CustomerId.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Store CreateStore(int customerId, string name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            Store store = new Store();
            store.CustomerId = customerId;
            store.Name = name;
            store.Rowguid = rowguid;
            store.ModifiedDate = modifiedDate;
            return store;
        }
        /// <summary>
        /// There are no comments for property CustomerId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                this.OnCustomerIdChanging(value);
                this.ReportPropertyChanging("CustomerId");
                this._CustomerId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerId");
                this.OnCustomerIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CustomerId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanged();
        /// <summary>
        /// Name of the store.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Demographic informationg about the store such as the number of employees, annual sales and store type.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Demographics
        {
            get
            {
                return this._Demographics;
            }
            set
            {
                this.OnDemographicsChanging(value);
                this.ReportPropertyChanging("Demographics");
                this._Demographics = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("Demographics");
                this.OnDemographicsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Demographics;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDemographicsChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDemographicsChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Store_CustomerId", "Customer")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Customer CustomerIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Store_CustomerId", "Customer").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Store_CustomerId", "Customer").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Customer> CustomerIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Customer>("AdvWorksModel.Store_CustomerId", "Customer");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Customer>("AdvWorksModel.Store_CustomerId", "Customer", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "Store_SalesPersonId", "SalesPerson")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public SalesPerson SalesPersonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.Store_SalesPersonId", "SalesPerson").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.Store_SalesPersonId", "SalesPerson").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for SalesPersonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<SalesPerson> SalesPersonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<SalesPerson>("AdvWorksModel.Store_SalesPersonId", "SalesPerson");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<SalesPerson>("AdvWorksModel.Store_SalesPersonId", "SalesPerson", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping stores and their employees.
    /// </summary>
    /// <KeyProperties>
    /// CustomerId
    /// ContactId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="StoreContact")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class StoreContact : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new StoreContact object.
        /// </summary>
        /// <param name="customerId">Initial value of CustomerId.</param>
        /// <param name="contactId">Initial value of ContactId.</param>
        /// <param name="rowguid">Initial value of Rowguid.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static StoreContact CreateStoreContact(int customerId, int contactId, global::System.Guid rowguid, global::System.DateTime modifiedDate)
        {
            StoreContact storeContact = new StoreContact();
            storeContact.CustomerId = customerId;
            storeContact.ContactId = contactId;
            storeContact.Rowguid = rowguid;
            storeContact.ModifiedDate = modifiedDate;
            return storeContact;
        }
        /// <summary>
        /// Store identification number. Foreign key to Customer.CustomerID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                this.OnCustomerIdChanging(value);
                this.ReportPropertyChanging("CustomerId");
                this._CustomerId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CustomerId");
                this.OnCustomerIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _CustomerId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCustomerIdChanged();
        /// <summary>
        /// Contact (store employee) identification number. Foreign key to Contact.ContactID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ContactId
        {
            get
            {
                return this._ContactId;
            }
            set
            {
                this.OnContactIdChanging(value);
                this.ReportPropertyChanging("ContactId");
                this._ContactId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ContactId");
                this.OnContactIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ContactId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanged();
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Guid Rowguid
        {
            get
            {
                return this._Rowguid;
            }
            set
            {
                this.OnRowguidChanging(value);
                this.ReportPropertyChanging("Rowguid");
                this._Rowguid = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Rowguid");
                this.OnRowguidChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Guid _Rowguid;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanging(global::System.Guid value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnRowguidChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ContactTypeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "StoreContact_ContactTypeId", "ContactType")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ContactType ContactTypeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.StoreContact_ContactTypeId", "ContactType").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.StoreContact_ContactTypeId", "ContactType").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactTypeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ContactType> ContactTypeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.StoreContact_ContactTypeId", "ContactType");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ContactType>("AdvWorksModel.StoreContact_ContactTypeId", "ContactType", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "StoreContact_CustomerId", "Store")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Store CustomerIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("AdvWorksModel.StoreContact_CustomerId", "Store").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("AdvWorksModel.StoreContact_CustomerId", "Store").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for CustomerIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Store> CustomerIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Store>("AdvWorksModel.StoreContact_CustomerId", "Store");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Store>("AdvWorksModel.StoreContact_CustomerId", "Store", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "StoreContact_ContactId", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.StoreContact_ContactId", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.StoreContact_ContactId", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.StoreContact_ContactId", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.StoreContact_ContactId", "Contact", value);
                }
            }
        }
    }
    /// <summary>
    /// Record of each purchase order, sales order, or work order transaction year to date.
    /// </summary>
    /// <KeyProperties>
    /// TransactionId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="TransactionHistory")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class TransactionHistory : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new TransactionHistory object.
        /// </summary>
        /// <param name="transactionId">Initial value of TransactionId.</param>
        /// <param name="referenceOrderId">Initial value of ReferenceOrderId.</param>
        /// <param name="referenceOrderLineId">Initial value of ReferenceOrderLineId.</param>
        /// <param name="transactionDate">Initial value of TransactionDate.</param>
        /// <param name="transactionType">Initial value of TransactionType.</param>
        /// <param name="quantity">Initial value of Quantity.</param>
        /// <param name="actualCost">Initial value of ActualCost.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static TransactionHistory CreateTransactionHistory(int transactionId, int referenceOrderId, int referenceOrderLineId, global::System.DateTime transactionDate, string transactionType, int quantity, decimal actualCost, global::System.DateTime modifiedDate)
        {
            TransactionHistory transactionHistory = new TransactionHistory();
            transactionHistory.TransactionId = transactionId;
            transactionHistory.ReferenceOrderId = referenceOrderId;
            transactionHistory.ReferenceOrderLineId = referenceOrderLineId;
            transactionHistory.TransactionDate = transactionDate;
            transactionHistory.TransactionType = transactionType;
            transactionHistory.Quantity = quantity;
            transactionHistory.ActualCost = actualCost;
            transactionHistory.ModifiedDate = modifiedDate;
            return transactionHistory;
        }
        /// <summary>
        /// There are no comments for property TransactionId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int TransactionId
        {
            get
            {
                return this._TransactionId;
            }
            set
            {
                this.OnTransactionIdChanging(value);
                this.ReportPropertyChanging("TransactionId");
                this._TransactionId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TransactionId");
                this.OnTransactionIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _TransactionId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionIdChanged();
        /// <summary>
        /// Purchase order, sales order, or work order identification number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ReferenceOrderId
        {
            get
            {
                return this._ReferenceOrderId;
            }
            set
            {
                this.OnReferenceOrderIdChanging(value);
                this.ReportPropertyChanging("ReferenceOrderId");
                this._ReferenceOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReferenceOrderId");
                this.OnReferenceOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ReferenceOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderIdChanged();
        /// <summary>
        /// Line number associated with the purchase order, sales order, or work order.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ReferenceOrderLineId
        {
            get
            {
                return this._ReferenceOrderLineId;
            }
            set
            {
                this.OnReferenceOrderLineIdChanging(value);
                this.ReportPropertyChanging("ReferenceOrderLineId");
                this._ReferenceOrderLineId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReferenceOrderLineId");
                this.OnReferenceOrderLineIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ReferenceOrderLineId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderLineIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderLineIdChanged();
        /// <summary>
        /// Date and time of the transaction.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime TransactionDate
        {
            get
            {
                return this._TransactionDate;
            }
            set
            {
                this.OnTransactionDateChanging(value);
                this.ReportPropertyChanging("TransactionDate");
                this._TransactionDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TransactionDate");
                this.OnTransactionDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _TransactionDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionDateChanged();
        /// <summary>
        /// W = WorkOrder, S = SalesOrder, P = PurchaseOrder
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string TransactionType
        {
            get
            {
                return this._TransactionType;
            }
            set
            {
                this.OnTransactionTypeChanging(value);
                this.ReportPropertyChanging("TransactionType");
                this._TransactionType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("TransactionType");
                this.OnTransactionTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _TransactionType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionTypeChanged();
        /// <summary>
        /// Product quantity.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int Quantity
        {
            get
            {
                return this._Quantity;
            }
            set
            {
                this.OnQuantityChanging(value);
                this.ReportPropertyChanging("Quantity");
                this._Quantity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Quantity");
                this.OnQuantityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _Quantity;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanged();
        /// <summary>
        /// Product cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ActualCost
        {
            get
            {
                return this._ActualCost;
            }
            set
            {
                this.OnActualCostChanging(value);
                this.ReportPropertyChanging("ActualCost");
                this._ActualCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualCost");
                this.OnActualCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ActualCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "TransactionHistory_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.TransactionHistory_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.TransactionHistory_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.TransactionHistory_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.TransactionHistory_ProductId", "Product", value);
                }
            }
        }
    }
    /// <summary>
    /// Transactions for previous years.
    /// </summary>
    /// <KeyProperties>
    /// TransactionId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="TransactionHistoryArchive")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class TransactionHistoryArchive : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new TransactionHistoryArchive object.
        /// </summary>
        /// <param name="transactionId">Initial value of TransactionId.</param>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="referenceOrderId">Initial value of ReferenceOrderId.</param>
        /// <param name="referenceOrderLineId">Initial value of ReferenceOrderLineId.</param>
        /// <param name="transactionDate">Initial value of TransactionDate.</param>
        /// <param name="transactionType">Initial value of TransactionType.</param>
        /// <param name="quantity">Initial value of Quantity.</param>
        /// <param name="actualCost">Initial value of ActualCost.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static TransactionHistoryArchive CreateTransactionHistoryArchive(int transactionId, int productId, int referenceOrderId, int referenceOrderLineId, global::System.DateTime transactionDate, string transactionType, int quantity, decimal actualCost, global::System.DateTime modifiedDate)
        {
            TransactionHistoryArchive transactionHistoryArchive = new TransactionHistoryArchive();
            transactionHistoryArchive.TransactionId = transactionId;
            transactionHistoryArchive.ProductId = productId;
            transactionHistoryArchive.ReferenceOrderId = referenceOrderId;
            transactionHistoryArchive.ReferenceOrderLineId = referenceOrderLineId;
            transactionHistoryArchive.TransactionDate = transactionDate;
            transactionHistoryArchive.TransactionType = transactionType;
            transactionHistoryArchive.Quantity = quantity;
            transactionHistoryArchive.ActualCost = actualCost;
            transactionHistoryArchive.ModifiedDate = modifiedDate;
            return transactionHistoryArchive;
        }
        /// <summary>
        /// There are no comments for property TransactionId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int TransactionId
        {
            get
            {
                return this._TransactionId;
            }
            set
            {
                this.OnTransactionIdChanging(value);
                this.ReportPropertyChanging("TransactionId");
                this._TransactionId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TransactionId");
                this.OnTransactionIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _TransactionId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionIdChanged();
        /// <summary>
        /// Product identification number. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Purchase order, sales order, or work order identification number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ReferenceOrderId
        {
            get
            {
                return this._ReferenceOrderId;
            }
            set
            {
                this.OnReferenceOrderIdChanging(value);
                this.ReportPropertyChanging("ReferenceOrderId");
                this._ReferenceOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReferenceOrderId");
                this.OnReferenceOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ReferenceOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderIdChanged();
        /// <summary>
        /// Line number associated with the purchase order, sales order, or work order.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ReferenceOrderLineId
        {
            get
            {
                return this._ReferenceOrderLineId;
            }
            set
            {
                this.OnReferenceOrderLineIdChanging(value);
                this.ReportPropertyChanging("ReferenceOrderLineId");
                this._ReferenceOrderLineId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ReferenceOrderLineId");
                this.OnReferenceOrderLineIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ReferenceOrderLineId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderLineIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnReferenceOrderLineIdChanged();
        /// <summary>
        /// Date and time of the transaction.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime TransactionDate
        {
            get
            {
                return this._TransactionDate;
            }
            set
            {
                this.OnTransactionDateChanging(value);
                this.ReportPropertyChanging("TransactionDate");
                this._TransactionDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("TransactionDate");
                this.OnTransactionDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _TransactionDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionDateChanged();
        /// <summary>
        /// W = Work Order, S = Sales Order, P = Purchase Order
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string TransactionType
        {
            get
            {
                return this._TransactionType;
            }
            set
            {
                this.OnTransactionTypeChanging(value);
                this.ReportPropertyChanging("TransactionType");
                this._TransactionType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("TransactionType");
                this.OnTransactionTypeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _TransactionType;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionTypeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnTransactionTypeChanged();
        /// <summary>
        /// Product quantity.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int Quantity
        {
            get
            {
                return this._Quantity;
            }
            set
            {
                this.OnQuantityChanging(value);
                this.ReportPropertyChanging("Quantity");
                this._Quantity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("Quantity");
                this.OnQuantityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _Quantity;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnQuantityChanged();
        /// <summary>
        /// Product cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal ActualCost
        {
            get
            {
                return this._ActualCost;
            }
            set
            {
                this.OnActualCostChanging(value);
                this.ReportPropertyChanging("ActualCost");
                this._ActualCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualCost");
                this.OnActualCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _ActualCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Unit of measure lookup table.
    /// </summary>
    /// <KeyProperties>
    /// UnitMeasureCode
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="UnitMeasure")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class UnitMeasure : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new UnitMeasure object.
        /// </summary>
        /// <param name="unitMeasureCode">Initial value of UnitMeasureCode.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static UnitMeasure CreateUnitMeasure(string unitMeasureCode, string name, global::System.DateTime modifiedDate)
        {
            UnitMeasure unitMeasure = new UnitMeasure();
            unitMeasure.UnitMeasureCode = unitMeasureCode;
            unitMeasure.Name = name;
            unitMeasure.ModifiedDate = modifiedDate;
            return unitMeasure;
        }
        /// <summary>
        /// There are no comments for property UnitMeasureCode in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string UnitMeasureCode
        {
            get
            {
                return this._UnitMeasureCode;
            }
            set
            {
                this.OnUnitMeasureCodeChanging(value);
                this.ReportPropertyChanging("UnitMeasureCode");
                this._UnitMeasureCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("UnitMeasureCode");
                this.OnUnitMeasureCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _UnitMeasureCode;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitMeasureCodeChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnUnitMeasureCodeChanged();
        /// <summary>
        /// Unit of measure description.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
    }
    /// <summary>
    /// Companies from whom Adventure Works Cycles purchases parts or other goods.
    /// </summary>
    /// <KeyProperties>
    /// VendorId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="Vendor")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class Vendor : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new Vendor object.
        /// </summary>
        /// <param name="vendorId">Initial value of VendorId.</param>
        /// <param name="accountNumber">Initial value of AccountNumber.</param>
        /// <param name="name">Initial value of Name.</param>
        /// <param name="creditRating">Initial value of CreditRating.</param>
        /// <param name="preferredVendorStatus">Initial value of PreferredVendorStatus.</param>
        /// <param name="activeFlag">Initial value of ActiveFlag.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static Vendor CreateVendor(int vendorId, string accountNumber, string name, byte creditRating, bool preferredVendorStatus, bool activeFlag, global::System.DateTime modifiedDate)
        {
            Vendor vendor = new Vendor();
            vendor.VendorId = vendorId;
            vendor.AccountNumber = accountNumber;
            vendor.Name = name;
            vendor.CreditRating = creditRating;
            vendor.PreferredVendorStatus = preferredVendorStatus;
            vendor.ActiveFlag = activeFlag;
            vendor.ModifiedDate = modifiedDate;
            return vendor;
        }
        /// <summary>
        /// There are no comments for property VendorId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int VendorId
        {
            get
            {
                return this._VendorId;
            }
            set
            {
                this.OnVendorIdChanging(value);
                this.ReportPropertyChanging("VendorId");
                this._VendorId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VendorId");
                this.OnVendorIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _VendorId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanged();
        /// <summary>
        /// Vendor account (identification) number.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string AccountNumber
        {
            get
            {
                return this._AccountNumber;
            }
            set
            {
                this.OnAccountNumberChanging(value);
                this.ReportPropertyChanging("AccountNumber");
                this._AccountNumber = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("AccountNumber");
                this.OnAccountNumberChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _AccountNumber;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAccountNumberChanged();
        /// <summary>
        /// Company name.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this.ReportPropertyChanging("Name");
                this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false);
                this.ReportPropertyChanged("Name");
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _Name;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnNameChanged();
        /// <summary>
        /// 1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below average
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public byte CreditRating
        {
            get
            {
                return this._CreditRating;
            }
            set
            {
                this.OnCreditRatingChanging(value);
                this.ReportPropertyChanging("CreditRating");
                this._CreditRating = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("CreditRating");
                this.OnCreditRatingChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private byte _CreditRating;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditRatingChanging(byte value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnCreditRatingChanged();
        /// <summary>
        /// 0 = Do not use if another vendor is available. 1 = Preferred over other vendors supplying the same product.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool PreferredVendorStatus
        {
            get
            {
                return this._PreferredVendorStatus;
            }
            set
            {
                this.OnPreferredVendorStatusChanging(value);
                this.ReportPropertyChanging("PreferredVendorStatus");
                this._PreferredVendorStatus = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PreferredVendorStatus");
                this.OnPreferredVendorStatusChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _PreferredVendorStatus;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPreferredVendorStatusChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPreferredVendorStatusChanged();
        /// <summary>
        /// 0 = Vendor no longer used. 1 = Vendor is actively used.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public bool ActiveFlag
        {
            get
            {
                return this._ActiveFlag;
            }
            set
            {
                this.OnActiveFlagChanging(value);
                this.ReportPropertyChanging("ActiveFlag");
                this._ActiveFlag = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActiveFlag");
                this.OnActiveFlagChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private bool _ActiveFlag;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActiveFlagChanging(bool value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActiveFlagChanged();
        /// <summary>
        /// Vendor URL.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public string PurchasingWebServiceUrl
        {
            get
            {
                return this._PurchasingWebServiceUrl;
            }
            set
            {
                this.OnPurchasingWebServiceUrlChanging(value);
                this.ReportPropertyChanging("PurchasingWebServiceUrl");
                this._PurchasingWebServiceUrl = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
                this.ReportPropertyChanged("PurchasingWebServiceUrl");
                this.OnPurchasingWebServiceUrlChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private string _PurchasingWebServiceUrl;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchasingWebServiceUrlChanging(string value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPurchasingWebServiceUrlChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for AddressObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorAddress_Vendor", "VendorAddress")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<VendorAddress> AddressObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<VendorAddress>("AdvWorksModel.VendorAddress_Vendor", "VendorAddress");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<VendorAddress>("AdvWorksModel.VendorAddress_Vendor", "VendorAddress", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactObjectList in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorContact_Vendor", "VendorContact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityCollection<VendorContact> ContactObjectList
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<VendorContact>("AdvWorksModel.VendorContact_Vendor", "VendorContact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection<VendorContact>("AdvWorksModel.VendorContact_Vendor", "VendorContact", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference mapping vendors and addresses.
    /// </summary>
    /// <KeyProperties>
    /// VendorId
    /// AddressId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="VendorAddress")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class VendorAddress : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new VendorAddress object.
        /// </summary>
        /// <param name="vendorId">Initial value of VendorId.</param>
        /// <param name="addressId">Initial value of AddressId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static VendorAddress CreateVendorAddress(int vendorId, int addressId, global::System.DateTime modifiedDate)
        {
            VendorAddress vendorAddress = new VendorAddress();
            vendorAddress.VendorId = vendorId;
            vendorAddress.AddressId = addressId;
            vendorAddress.ModifiedDate = modifiedDate;
            return vendorAddress;
        }
        /// <summary>
        /// There are no comments for property VendorId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int VendorId
        {
            get
            {
                return this._VendorId;
            }
            set
            {
                this.OnVendorIdChanging(value);
                this.ReportPropertyChanging("VendorId");
                this._VendorId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VendorId");
                this.OnVendorIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _VendorId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanged();
        /// <summary>
        /// Primary key. Foreign key to Address.AddressID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int AddressId
        {
            get
            {
                return this._AddressId;
            }
            set
            {
                this.OnAddressIdChanging(value);
                this.ReportPropertyChanging("AddressId");
                this._AddressId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("AddressId");
                this.OnAddressIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _AddressId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnAddressIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for VendorObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorAddress_Vendor", "Vendor")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Vendor VendorObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorAddress_Vendor", "Vendor").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorAddress_Vendor", "Vendor").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for VendorObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Vendor> VendorObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorAddress_Vendor", "Vendor");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Vendor>("AdvWorksModel.VendorAddress_Vendor", "Vendor", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for AddressIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorAddress_AddressId", "Address")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Address AddressIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.VendorAddress_AddressId", "Address").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.VendorAddress_AddressId", "Address").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for AddressIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Address> AddressIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Address>("AdvWorksModel.VendorAddress_AddressId", "Address");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Address>("AdvWorksModel.VendorAddress_AddressId", "Address", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for AddressTypeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorAddress_AddressTypeId", "AddressType")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public AddressType AddressTypeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.VendorAddress_AddressTypeId", "AddressType").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.VendorAddress_AddressTypeId", "AddressType").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for AddressTypeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<AddressType> AddressTypeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<AddressType>("AdvWorksModel.VendorAddress_AddressTypeId", "AddressType");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<AddressType>("AdvWorksModel.VendorAddress_AddressTypeId", "AddressType", value);
                }
            }
        }
    }
    /// <summary>
    /// Cross-reference table mapping vendors and their employees.
    /// </summary>
    /// <KeyProperties>
    /// VendorId
    /// ContactId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="VendorContact")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class VendorContact : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new VendorContact object.
        /// </summary>
        /// <param name="vendorId">Initial value of VendorId.</param>
        /// <param name="contactId">Initial value of ContactId.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static VendorContact CreateVendorContact(int vendorId, int contactId, global::System.DateTime modifiedDate)
        {
            VendorContact vendorContact = new VendorContact();
            vendorContact.VendorId = vendorId;
            vendorContact.ContactId = contactId;
            vendorContact.ModifiedDate = modifiedDate;
            return vendorContact;
        }
        /// <summary>
        /// There are no comments for property VendorId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int VendorId
        {
            get
            {
                return this._VendorId;
            }
            set
            {
                this.OnVendorIdChanging(value);
                this.ReportPropertyChanging("VendorId");
                this._VendorId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("VendorId");
                this.OnVendorIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _VendorId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnVendorIdChanged();
        /// <summary>
        /// Contact (Vendor employee) identification number. Foreign key to Contact.ContactID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ContactId
        {
            get
            {
                return this._ContactId;
            }
            set
            {
                this.OnContactIdChanging(value);
                this.ReportPropertyChanging("ContactId");
                this._ContactId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ContactId");
                this.OnContactIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ContactId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnContactIdChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for VendorObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorContact_Vendor", "Vendor")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Vendor VendorObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorContact_Vendor", "Vendor").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorContact_Vendor", "Vendor").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for VendorObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Vendor> VendorObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Vendor>("AdvWorksModel.VendorContact_Vendor", "Vendor");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Vendor>("AdvWorksModel.VendorContact_Vendor", "Vendor", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorContact_ContactId", "Contact")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Contact ContactIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.VendorContact_ContactId", "Contact").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.VendorContact_ContactId", "Contact").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Contact> ContactIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Contact>("AdvWorksModel.VendorContact_ContactId", "Contact");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Contact>("AdvWorksModel.VendorContact_ContactId", "Contact", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ContactTypeIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "VendorContact_ContactTypeId", "ContactType")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ContactType ContactTypeIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.VendorContact_ContactTypeId", "ContactType").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.VendorContact_ContactTypeId", "ContactType").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ContactTypeIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ContactType> ContactTypeIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ContactType>("AdvWorksModel.VendorContact_ContactTypeId", "ContactType");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ContactType>("AdvWorksModel.VendorContact_ContactTypeId", "ContactType", value);
                }
            }
        }
    }
    /// <summary>
    /// Manufacturing work orders.
    /// </summary>
    /// <KeyProperties>
    /// WorkOrderId
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="WorkOrder")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class WorkOrder : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new WorkOrder object.
        /// </summary>
        /// <param name="workOrderId">Initial value of WorkOrderId.</param>
        /// <param name="orderQty">Initial value of OrderQty.</param>
        /// <param name="stockedQty">Initial value of StockedQty.</param>
        /// <param name="scrappedQty">Initial value of ScrappedQty.</param>
        /// <param name="startDate">Initial value of StartDate.</param>
        /// <param name="dueDate">Initial value of DueDate.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static WorkOrder CreateWorkOrder(int workOrderId, int orderQty, int stockedQty, short scrappedQty, global::System.DateTime startDate, global::System.DateTime dueDate, global::System.DateTime modifiedDate)
        {
            WorkOrder workOrder = new WorkOrder();
            workOrder.WorkOrderId = workOrderId;
            workOrder.OrderQty = orderQty;
            workOrder.StockedQty = stockedQty;
            workOrder.ScrappedQty = scrappedQty;
            workOrder.StartDate = startDate;
            workOrder.DueDate = dueDate;
            workOrder.ModifiedDate = modifiedDate;
            return workOrder;
        }
        /// <summary>
        /// There are no comments for property WorkOrderId in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int WorkOrderId
        {
            get
            {
                return this._WorkOrderId;
            }
            set
            {
                this.OnWorkOrderIdChanging(value);
                this.ReportPropertyChanging("WorkOrderId");
                this._WorkOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("WorkOrderId");
                this.OnWorkOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _WorkOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWorkOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWorkOrderIdChanged();
        /// <summary>
        /// Product quantity to build.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int OrderQty
        {
            get
            {
                return this._OrderQty;
            }
            set
            {
                this.OnOrderQtyChanging(value);
                this.ReportPropertyChanging("OrderQty");
                this._OrderQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OrderQty");
                this.OnOrderQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _OrderQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOrderQtyChanged();
        /// <summary>
        /// Quantity built and put in inventory.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int StockedQty
        {
            get
            {
                return this._StockedQty;
            }
            set
            {
                this.OnStockedQtyChanging(value);
                this.ReportPropertyChanging("StockedQty");
                this._StockedQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StockedQty");
                this.OnStockedQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _StockedQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStockedQtyChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStockedQtyChanged();
        /// <summary>
        /// Quantity that failed inspection.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short ScrappedQty
        {
            get
            {
                return this._ScrappedQty;
            }
            set
            {
                this.OnScrappedQtyChanging(value);
                this.ReportPropertyChanging("ScrappedQty");
                this._ScrappedQty = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ScrappedQty");
                this.OnScrappedQtyChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _ScrappedQty;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScrappedQtyChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScrappedQtyChanged();
        /// <summary>
        /// Work order start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime StartDate
        {
            get
            {
                return this._StartDate;
            }
            set
            {
                this.OnStartDateChanging(value);
                this.ReportPropertyChanging("StartDate");
                this._StartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("StartDate");
                this.OnStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _StartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnStartDateChanged();
        /// <summary>
        /// Work order end date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> EndDate
        {
            get
            {
                return this._EndDate;
            }
            set
            {
                this.OnEndDateChanging(value);
                this.ReportPropertyChanging("EndDate");
                this._EndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("EndDate");
                this.OnEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _EndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnEndDateChanged();
        /// <summary>
        /// Work order due date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime DueDate
        {
            get
            {
                return this._DueDate;
            }
            set
            {
                this.OnDueDateChanging(value);
                this.ReportPropertyChanging("DueDate");
                this._DueDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("DueDate");
                this.OnDueDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _DueDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnDueDateChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "WorkOrder_ProductId", "Product")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Product ProductIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.WorkOrder_ProductId", "Product").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.WorkOrder_ProductId", "Product").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ProductIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Product> ProductIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Product>("AdvWorksModel.WorkOrder_ProductId", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Product>("AdvWorksModel.WorkOrder_ProductId", "Product", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for ScrapReasonIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "WorkOrder_ScrapReasonId", "ScrapReason")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public ScrapReason ScrapReasonIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ScrapReason>("AdvWorksModel.WorkOrder_ScrapReasonId", "ScrapReason").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ScrapReason>("AdvWorksModel.WorkOrder_ScrapReasonId", "ScrapReason").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for ScrapReasonIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<ScrapReason> ScrapReasonIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<ScrapReason>("AdvWorksModel.WorkOrder_ScrapReasonId", "ScrapReason");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<ScrapReason>("AdvWorksModel.WorkOrder_ScrapReasonId", "ScrapReason", value);
                }
            }
        }
    }
    /// <summary>
    /// Work order details.
    /// </summary>
    /// <KeyProperties>
    /// WorkOrderId
    /// ProductId
    /// OperationSequence
    /// </KeyProperties>
    [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="AdvWorksModel", Name="WorkOrderRouting")]
    [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
    [global::System.Serializable()]
    public partial class WorkOrderRouting : global::System.Data.Objects.DataClasses.EntityObject
    {
        /// <summary>
        /// Create a new WorkOrderRouting object.
        /// </summary>
        /// <param name="workOrderId">Initial value of WorkOrderId.</param>
        /// <param name="productId">Initial value of ProductId.</param>
        /// <param name="operationSequence">Initial value of OperationSequence.</param>
        /// <param name="scheduledStartDate">Initial value of ScheduledStartDate.</param>
        /// <param name="scheduledEndDate">Initial value of ScheduledEndDate.</param>
        /// <param name="plannedCost">Initial value of PlannedCost.</param>
        /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public static WorkOrderRouting CreateWorkOrderRouting(int workOrderId, int productId, short operationSequence, global::System.DateTime scheduledStartDate, global::System.DateTime scheduledEndDate, decimal plannedCost, global::System.DateTime modifiedDate)
        {
            WorkOrderRouting workOrderRouting = new WorkOrderRouting();
            workOrderRouting.WorkOrderId = workOrderId;
            workOrderRouting.ProductId = productId;
            workOrderRouting.OperationSequence = operationSequence;
            workOrderRouting.ScheduledStartDate = scheduledStartDate;
            workOrderRouting.ScheduledEndDate = scheduledEndDate;
            workOrderRouting.PlannedCost = plannedCost;
            workOrderRouting.ModifiedDate = modifiedDate;
            return workOrderRouting;
        }
        /// <summary>
        /// Primary key. Foreign key to WorkOrder.WorkOrderID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int WorkOrderId
        {
            get
            {
                return this._WorkOrderId;
            }
            set
            {
                this.OnWorkOrderIdChanging(value);
                this.ReportPropertyChanging("WorkOrderId");
                this._WorkOrderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("WorkOrderId");
                this.OnWorkOrderIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _WorkOrderId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWorkOrderIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnWorkOrderIdChanged();
        /// <summary>
        /// Primary key. Foreign key to Product.ProductID.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public int ProductId
        {
            get
            {
                return this._ProductId;
            }
            set
            {
                this.OnProductIdChanging(value);
                this.ReportPropertyChanging("ProductId");
                this._ProductId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ProductId");
                this.OnProductIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private int _ProductId;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanging(int value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnProductIdChanged();
        /// <summary>
        /// Primary key. Indicates the manufacturing process sequence.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public short OperationSequence
        {
            get
            {
                return this._OperationSequence;
            }
            set
            {
                this.OnOperationSequenceChanging(value);
                this.ReportPropertyChanging("OperationSequence");
                this._OperationSequence = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("OperationSequence");
                this.OnOperationSequenceChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private short _OperationSequence;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOperationSequenceChanging(short value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnOperationSequenceChanged();
        /// <summary>
        /// Planned manufacturing start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ScheduledStartDate
        {
            get
            {
                return this._ScheduledStartDate;
            }
            set
            {
                this.OnScheduledStartDateChanging(value);
                this.ReportPropertyChanging("ScheduledStartDate");
                this._ScheduledStartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ScheduledStartDate");
                this.OnScheduledStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ScheduledStartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScheduledStartDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScheduledStartDateChanged();
        /// <summary>
        /// Planned manufacturing end date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ScheduledEndDate
        {
            get
            {
                return this._ScheduledEndDate;
            }
            set
            {
                this.OnScheduledEndDateChanging(value);
                this.ReportPropertyChanging("ScheduledEndDate");
                this._ScheduledEndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ScheduledEndDate");
                this.OnScheduledEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ScheduledEndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScheduledEndDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnScheduledEndDateChanged();
        /// <summary>
        /// Actual start date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> ActualStartDate
        {
            get
            {
                return this._ActualStartDate;
            }
            set
            {
                this.OnActualStartDateChanging(value);
                this.ReportPropertyChanging("ActualStartDate");
                this._ActualStartDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualStartDate");
                this.OnActualStartDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _ActualStartDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualStartDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualStartDateChanged();
        /// <summary>
        /// Actual end date.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<global::System.DateTime> ActualEndDate
        {
            get
            {
                return this._ActualEndDate;
            }
            set
            {
                this.OnActualEndDateChanging(value);
                this.ReportPropertyChanging("ActualEndDate");
                this._ActualEndDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualEndDate");
                this.OnActualEndDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<global::System.DateTime> _ActualEndDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualEndDateChanging(global::System.Nullable<global::System.DateTime> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualEndDateChanged();
        /// <summary>
        /// Number of manufacturing hours used.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<decimal> ActualResourceHrs
        {
            get
            {
                return this._ActualResourceHrs;
            }
            set
            {
                this.OnActualResourceHrsChanging(value);
                this.ReportPropertyChanging("ActualResourceHrs");
                this._ActualResourceHrs = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualResourceHrs");
                this.OnActualResourceHrsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<decimal> _ActualResourceHrs;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualResourceHrsChanging(global::System.Nullable<decimal> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualResourceHrsChanged();
        /// <summary>
        /// Estimated manufacturing cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public decimal PlannedCost
        {
            get
            {
                return this._PlannedCost;
            }
            set
            {
                this.OnPlannedCostChanging(value);
                this.ReportPropertyChanging("PlannedCost");
                this._PlannedCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("PlannedCost");
                this.OnPlannedCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private decimal _PlannedCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPlannedCostChanging(decimal value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnPlannedCostChanged();
        /// <summary>
        /// Actual manufacturing cost.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.Nullable<decimal> ActualCost
        {
            get
            {
                return this._ActualCost;
            }
            set
            {
                this.OnActualCostChanging(value);
                this.ReportPropertyChanging("ActualCost");
                this._ActualCost = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ActualCost");
                this.OnActualCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.Nullable<decimal> _ActualCost;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanging(global::System.Nullable<decimal> value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnActualCostChanged();
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        public global::System.DateTime ModifiedDate
        {
            get
            {
                return this._ModifiedDate;
            }
            set
            {
                this.OnModifiedDateChanging(value);
                this.ReportPropertyChanging("ModifiedDate");
                this._ModifiedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
                this.ReportPropertyChanged("ModifiedDate");
                this.OnModifiedDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        private global::System.DateTime _ModifiedDate;
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanging(global::System.DateTime value);
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        partial void OnModifiedDateChanged();
        /// <summary>
        /// There are no comments for LocationIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "WorkOrderRouting_LocationId", "Location")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public Location LocationIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.WorkOrderRouting_LocationId", "Location").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.WorkOrderRouting_LocationId", "Location").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for LocationIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<Location> LocationIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<Location>("AdvWorksModel.WorkOrderRouting_LocationId", "Location");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<Location>("AdvWorksModel.WorkOrderRouting_LocationId", "Location", value);
                }
            }
        }
        /// <summary>
        /// There are no comments for WorkOrderIdObject in the schema.
        /// </summary>
        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("AdvWorksModel", "WorkOrderRouting_WorkOrderId", "WorkOrder")]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Xml.Serialization.XmlIgnoreAttribute()]
        [global::System.Xml.Serialization.SoapIgnoreAttribute()]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public WorkOrder WorkOrderIdObject
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<WorkOrder>("AdvWorksModel.WorkOrderRouting_WorkOrderId", "WorkOrder").Value;
            }
            set
            {
                ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<WorkOrder>("AdvWorksModel.WorkOrderRouting_WorkOrderId", "WorkOrder").Value = value;
            }
        }
        /// <summary>
        /// There are no comments for WorkOrderIdObject in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
        [global::System.Runtime.Serialization.DataMemberAttribute()]
        public global::System.Data.Objects.DataClasses.EntityReference<WorkOrder> WorkOrderIdObjectReference
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference<WorkOrder>("AdvWorksModel.WorkOrderRouting_WorkOrderId", "WorkOrder");
            }
            set
            {
                if ((value != null))
                {
                    ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference<WorkOrder>("AdvWorksModel.WorkOrderRouting_WorkOrderId", "WorkOrder", value);
                }
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Xomega.Net
United States United States
Xomega Team is striving to increase productivity and development quality by utilizing Model Driven Development coupled with Code Generation and the best design practices for application development.
We provide MDD tools, code generators and frameworks for Visual Studio and .Net development.
Visit us at http://www.xomega.net
This is a Organisation

1 members

Comments and Discussions