//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:2.0.50727.312 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.DLinq; using System.Expressions; using System.Query; using System.Reflection; public partial class AdventureWorks : DataContext { public Production Production; public Sales Sales; public Person Person; public Table AWBuildVersion; public Table DatabaseLog; public Table ErrorLog; public HumanResources HumanResources; public Purchasing Purchasing; public AdventureWorks(string connection) : base(connection) { } public AdventureWorks(System.Data.IDbConnection connection) : base(connection) { } public AdventureWorks(string connection, System.Data.DLinq.MappingSource mappingSource) : base(connection, mappingSource) { } public AdventureWorks(System.Data.IDbConnection connection, System.Data.DLinq.MappingSource mappingSource) : base(connection, mappingSource) { } } public partial class Production : Schema { public Table ProductProductPhoto; public Table ProductReview; public Table TransactionHistory; public Table ProductSubcategory; public Table TransactionHistoryArchive; public Table BillOfMaterials; public Table UnitMeasure; public Table WorkOrder; public Table WorkOrderRouting; public Table Culture; public Table Document; public Table Illustration; public Table Location; public Table Product; public Table ScrapReason; public Table ProductCategory; public Table ProductCostHistory; public Table ProductDescription; public Table ProductDocument; public Table ProductInventory; public Table ProductListPriceHistory; public Table ProductModel; public Table ProductModelIllustration; public Table ProductModelProductDescriptionCulture; public Table ProductPhoto; public Production(DataContext context) : base(context) { } } [Table(Name="[Production].[ProductProductPhoto]")] public partial class ProductProductPhoto : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private int _ProductPhotoID; private bool _Primary; private System.DateTime _ModifiedDate; private EntityRef _Product; private EntityRef _ProductPhoto; public ProductProductPhoto() { this._Product = default(EntityRef); this._ProductPhoto = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_ProductPhotoID", DBType="Int NOT NULL", Id=true)] public int ProductPhotoID { get { return this._ProductPhotoID; } set { if ((this._ProductPhotoID != value)) { this.OnPropertyChanging("ProductPhotoID"); this._ProductPhotoID = value; this.OnPropertyChanged("ProductPhotoID"); } } } [Column(Storage="_Primary", DBType="Bit NOT NULL")] public bool Primary { get { return this._Primary; } set { if ((this._Primary != value)) { this.OnPropertyChanging("Primary"); this._Primary = value; this.OnPropertyChanged("Primary"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductProductPhoto_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductProductPhoto.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductProductPhoto.Add(this); } this.OnPropertyChanged("Product"); } } } [Association(Name="FK_ProductProductPhoto_ProductPhoto_ProductPhotoID", Storage="_ProductPhoto", ThisKey="ProductPhotoID", IsParent=true)] public ProductPhoto ProductPhoto { get { return this._ProductPhoto.Entity; } set { ProductPhoto v = this._ProductPhoto.Entity; if ((v != value)) { this.OnPropertyChanging("ProductPhoto"); if ((v != null)) { this._ProductPhoto.Entity = null; v.ProductProductPhoto.Remove(this); } this._ProductPhoto.Entity = value; if ((value != null)) { value.ProductProductPhoto.Add(this); } this.OnPropertyChanged("ProductPhoto"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductReview]")] public partial class ProductReview : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductReviewID; private int _ProductID; private string _ReviewerName; private System.DateTime _ReviewDate; private string _EmailAddress; private int _Rating; private string _Comments; private System.DateTime _ModifiedDate; private EntityRef _Product; public ProductReview() { this._Product = default(EntityRef); } [Column(Storage="_ProductReviewID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductReviewID { get { return this._ProductReviewID; } set { if ((this._ProductReviewID != value)) { this.OnPropertyChanging("ProductReviewID"); this._ProductReviewID = value; this.OnPropertyChanged("ProductReviewID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_ReviewerName", DBType="NVarChar(50) NOT NULL")] public string ReviewerName { get { return this._ReviewerName; } set { if ((this._ReviewerName != value)) { this.OnPropertyChanging("ReviewerName"); this._ReviewerName = value; this.OnPropertyChanged("ReviewerName"); } } } [Column(Storage="_ReviewDate", DBType="DateTime NOT NULL")] public System.DateTime ReviewDate { get { return this._ReviewDate; } set { if ((this._ReviewDate != value)) { this.OnPropertyChanging("ReviewDate"); this._ReviewDate = value; this.OnPropertyChanged("ReviewDate"); } } } [Column(Storage="_EmailAddress", DBType="NVarChar(50) NOT NULL")] public string EmailAddress { get { return this._EmailAddress; } set { if ((this._EmailAddress != value)) { this.OnPropertyChanging("EmailAddress"); this._EmailAddress = value; this.OnPropertyChanged("EmailAddress"); } } } [Column(Storage="_Rating", DBType="Int NOT NULL")] public int Rating { get { return this._Rating; } set { if ((this._Rating != value)) { this.OnPropertyChanging("Rating"); this._Rating = value; this.OnPropertyChanged("Rating"); } } } [Column(Storage="_Comments", DBType="NVarChar(3850)")] public string Comments { get { return this._Comments; } set { if ((this._Comments != value)) { this.OnPropertyChanging("Comments"); this._Comments = value; this.OnPropertyChanged("Comments"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductReview_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductReview.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductReview.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[TransactionHistory]")] public partial class TransactionHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _TransactionID; private int _ProductID; private int _ReferenceOrderID; private int _ReferenceOrderLineID; private System.DateTime _TransactionDate; private string _TransactionType; private int _Quantity; private decimal _ActualCost; private System.DateTime _ModifiedDate; private EntityRef _Product; public TransactionHistory() { this._Product = default(EntityRef); } [Column(Storage="_TransactionID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int TransactionID { get { return this._TransactionID; } set { if ((this._TransactionID != value)) { this.OnPropertyChanging("TransactionID"); this._TransactionID = value; this.OnPropertyChanged("TransactionID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_ReferenceOrderID", DBType="Int NOT NULL")] public int ReferenceOrderID { get { return this._ReferenceOrderID; } set { if ((this._ReferenceOrderID != value)) { this.OnPropertyChanging("ReferenceOrderID"); this._ReferenceOrderID = value; this.OnPropertyChanged("ReferenceOrderID"); } } } [Column(Storage="_ReferenceOrderLineID", DBType="Int NOT NULL")] public int ReferenceOrderLineID { get { return this._ReferenceOrderLineID; } set { if ((this._ReferenceOrderLineID != value)) { this.OnPropertyChanging("ReferenceOrderLineID"); this._ReferenceOrderLineID = value; this.OnPropertyChanged("ReferenceOrderLineID"); } } } [Column(Storage="_TransactionDate", DBType="DateTime NOT NULL")] public System.DateTime TransactionDate { get { return this._TransactionDate; } set { if ((this._TransactionDate != value)) { this.OnPropertyChanging("TransactionDate"); this._TransactionDate = value; this.OnPropertyChanged("TransactionDate"); } } } [Column(Storage="_TransactionType", DBType="NChar(1) NOT NULL")] public string TransactionType { get { return this._TransactionType; } set { if ((this._TransactionType != value)) { this.OnPropertyChanging("TransactionType"); this._TransactionType = value; this.OnPropertyChanged("TransactionType"); } } } [Column(Storage="_Quantity", DBType="Int NOT NULL")] public int Quantity { get { return this._Quantity; } set { if ((this._Quantity != value)) { this.OnPropertyChanging("Quantity"); this._Quantity = value; this.OnPropertyChanged("Quantity"); } } } [Column(Storage="_ActualCost", DBType="Money NOT NULL")] public decimal ActualCost { get { return this._ActualCost; } set { if ((this._ActualCost != value)) { this.OnPropertyChanging("ActualCost"); this._ActualCost = value; this.OnPropertyChanged("ActualCost"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_TransactionHistory_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.TransactionHistory.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.TransactionHistory.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductSubcategory]")] public partial class ProductSubcategory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductSubcategoryID; private int _ProductCategoryID; private string _Name; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _Product; private EntityRef _ProductCategory; public ProductSubcategory() { this._Product = new EntitySet(new Notification(this.attach_Product), new Notification(this.detach_Product)); this._ProductCategory = default(EntityRef); } [Column(Storage="_ProductSubcategoryID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductSubcategoryID { get { return this._ProductSubcategoryID; } set { if ((this._ProductSubcategoryID != value)) { this.OnPropertyChanging("ProductSubcategoryID"); this._ProductSubcategoryID = value; this.OnPropertyChanged("ProductSubcategoryID"); } } } [Column(Storage="_ProductCategoryID", DBType="Int NOT NULL")] public int ProductCategoryID { get { return this._ProductCategoryID; } set { if ((this._ProductCategoryID != value)) { this.OnPropertyChanging("ProductCategoryID"); this._ProductCategoryID = value; this.OnPropertyChanged("ProductCategoryID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Product_ProductSubcategory_ProductSubcategoryID", Storage="_Product", OtherKey="ProductSubcategoryID")] public EntitySet Product { get { return this._Product; } set { this._Product.Assign(value); } } [Association(Name="FK_ProductSubcategory_ProductCategory_ProductCategoryID", Storage="_ProductCategory", ThisKey="ProductCategoryID", IsParent=true)] public ProductCategory ProductCategory { get { return this._ProductCategory.Entity; } set { ProductCategory v = this._ProductCategory.Entity; if ((v != value)) { this.OnPropertyChanging("ProductCategory"); if ((v != null)) { this._ProductCategory.Entity = null; v.ProductSubcategory.Remove(this); } this._ProductCategory.Entity = value; if ((value != null)) { value.ProductSubcategory.Add(this); } this.OnPropertyChanged("ProductCategory"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_Product(Product entity) { this.OnPropertyChanging(null); entity.ProductSubcategory = this; this.OnPropertyChanged(null); } private void detach_Product(Product entity) { this.OnPropertyChanging(null); entity.ProductSubcategory = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[TransactionHistoryArchive]")] public partial class TransactionHistoryArchive : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _TransactionID; private int _ProductID; private int _ReferenceOrderID; private int _ReferenceOrderLineID; private System.DateTime _TransactionDate; private string _TransactionType; private int _Quantity; private decimal _ActualCost; private System.DateTime _ModifiedDate; public TransactionHistoryArchive() { } [Column(Storage="_TransactionID", DBType="Int NOT NULL", Id=true)] public int TransactionID { get { return this._TransactionID; } set { if ((this._TransactionID != value)) { this.OnPropertyChanging("TransactionID"); this._TransactionID = value; this.OnPropertyChanged("TransactionID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_ReferenceOrderID", DBType="Int NOT NULL")] public int ReferenceOrderID { get { return this._ReferenceOrderID; } set { if ((this._ReferenceOrderID != value)) { this.OnPropertyChanging("ReferenceOrderID"); this._ReferenceOrderID = value; this.OnPropertyChanged("ReferenceOrderID"); } } } [Column(Storage="_ReferenceOrderLineID", DBType="Int NOT NULL")] public int ReferenceOrderLineID { get { return this._ReferenceOrderLineID; } set { if ((this._ReferenceOrderLineID != value)) { this.OnPropertyChanging("ReferenceOrderLineID"); this._ReferenceOrderLineID = value; this.OnPropertyChanged("ReferenceOrderLineID"); } } } [Column(Storage="_TransactionDate", DBType="DateTime NOT NULL")] public System.DateTime TransactionDate { get { return this._TransactionDate; } set { if ((this._TransactionDate != value)) { this.OnPropertyChanging("TransactionDate"); this._TransactionDate = value; this.OnPropertyChanged("TransactionDate"); } } } [Column(Storage="_TransactionType", DBType="NChar(1) NOT NULL")] public string TransactionType { get { return this._TransactionType; } set { if ((this._TransactionType != value)) { this.OnPropertyChanging("TransactionType"); this._TransactionType = value; this.OnPropertyChanged("TransactionType"); } } } [Column(Storage="_Quantity", DBType="Int NOT NULL")] public int Quantity { get { return this._Quantity; } set { if ((this._Quantity != value)) { this.OnPropertyChanging("Quantity"); this._Quantity = value; this.OnPropertyChanged("Quantity"); } } } [Column(Storage="_ActualCost", DBType="Money NOT NULL")] public decimal ActualCost { get { return this._ActualCost; } set { if ((this._ActualCost != value)) { this.OnPropertyChanging("ActualCost"); this._ActualCost = value; this.OnPropertyChanged("ActualCost"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[BillOfMaterials]")] public partial class BillOfMaterials : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _BillOfMaterialsID; private System.Nullable _ProductAssemblyID; private int _ComponentID; private System.DateTime _StartDate; private System.Nullable _EndDate; private string _UnitMeasureCode; private short _BOMLevel; private decimal _PerAssemblyQty; private System.DateTime _ModifiedDate; private EntityRef _Component; private EntityRef _ProductAssembly; private EntityRef _UnitMeasure; public BillOfMaterials() { this._Component = default(EntityRef); this._ProductAssembly = default(EntityRef); this._UnitMeasure = default(EntityRef); } [Column(Storage="_BillOfMaterialsID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int BillOfMaterialsID { get { return this._BillOfMaterialsID; } set { if ((this._BillOfMaterialsID != value)) { this.OnPropertyChanging("BillOfMaterialsID"); this._BillOfMaterialsID = value; this.OnPropertyChanged("BillOfMaterialsID"); } } } [Column(Storage="_ProductAssemblyID", DBType="Int")] public System.Nullable ProductAssemblyID { get { return this._ProductAssemblyID; } set { if ((this._ProductAssemblyID != value)) { this.OnPropertyChanging("ProductAssemblyID"); this._ProductAssemblyID = value; this.OnPropertyChanged("ProductAssemblyID"); } } } [Column(Storage="_ComponentID", DBType="Int NOT NULL")] public int ComponentID { get { return this._ComponentID; } set { if ((this._ComponentID != value)) { this.OnPropertyChanging("ComponentID"); this._ComponentID = value; this.OnPropertyChanged("ComponentID"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL")] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_UnitMeasureCode", DBType="NChar(3) NOT NULL")] public string UnitMeasureCode { get { return this._UnitMeasureCode; } set { if ((this._UnitMeasureCode != value)) { this.OnPropertyChanging("UnitMeasureCode"); this._UnitMeasureCode = value; this.OnPropertyChanged("UnitMeasureCode"); } } } [Column(Storage="_BOMLevel", DBType="SmallInt NOT NULL")] public short BOMLevel { get { return this._BOMLevel; } set { if ((this._BOMLevel != value)) { this.OnPropertyChanging("BOMLevel"); this._BOMLevel = value; this.OnPropertyChanged("BOMLevel"); } } } [Column(Storage="_PerAssemblyQty", DBType="Decimal(8,2) NOT NULL")] public decimal PerAssemblyQty { get { return this._PerAssemblyQty; } set { if ((this._PerAssemblyQty != value)) { this.OnPropertyChanging("PerAssemblyQty"); this._PerAssemblyQty = value; this.OnPropertyChanged("PerAssemblyQty"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_BillOfMaterials_Product_ComponentID", Storage="_Component", ThisKey="ComponentID", IsParent=true)] public Product Component { get { return this._Component.Entity; } set { Product v = this._Component.Entity; if ((v != value)) { this.OnPropertyChanging("Component"); if ((v != null)) { this._Component.Entity = null; v.BillOfMaterialsProductComponentID.Remove(this); } this._Component.Entity = value; if ((value != null)) { value.BillOfMaterialsProductComponentID.Add(this); } this.OnPropertyChanged("Component"); } } } [Association(Name="FK_BillOfMaterials_Product_ProductAssemblyID", Storage="_ProductAssembly", ThisKey="ProductAssemblyID", IsParent=true)] public Product ProductAssembly { get { return this._ProductAssembly.Entity; } set { Product v = this._ProductAssembly.Entity; if ((v != value)) { this.OnPropertyChanging("ProductAssembly"); if ((v != null)) { this._ProductAssembly.Entity = null; v.BillOfMaterialsProductProductAssemblyID.Remove(this); } this._ProductAssembly.Entity = value; if ((value != null)) { value.BillOfMaterialsProductProductAssemblyID.Add(this); } this.OnPropertyChanged("ProductAssembly"); } } } [Association(Name="FK_BillOfMaterials_UnitMeasure_UnitMeasureCode", Storage="_UnitMeasure", ThisKey="UnitMeasureCode", IsParent=true)] public UnitMeasure UnitMeasure { get { return this._UnitMeasure.Entity; } set { UnitMeasure v = this._UnitMeasure.Entity; if ((v != value)) { this.OnPropertyChanging("UnitMeasure"); if ((v != null)) { this._UnitMeasure.Entity = null; v.BillOfMaterials.Remove(this); } this._UnitMeasure.Entity = value; if ((value != null)) { value.BillOfMaterials.Add(this); } this.OnPropertyChanged("UnitMeasure"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[UnitMeasure]")] public partial class UnitMeasure : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private string _UnitMeasureCode; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _BillOfMaterials; private EntitySet _UnitMeasureCodeProduct; private EntitySet _ProductUnitMeasureWeightUnitMeasureCode; private EntitySet _ProductVendor; public UnitMeasure() { this._BillOfMaterials = new EntitySet(new Notification(this.attach_BillOfMaterials), new Notification(this.detach_BillOfMaterials)); this._UnitMeasureCodeProduct = new EntitySet(new Notification(this.attach_UnitMeasureCodeProduct), new Notification(this.detach_UnitMeasureCodeProduct)); this._ProductUnitMeasureWeightUnitMeasureCode = new EntitySet(new Notification(this.attach_ProductUnitMeasureWeightUnitMeasureCode), new Notification(this.detach_ProductUnitMeasureWeightUnitMeasureCode)); this._ProductVendor = new EntitySet(new Notification(this.attach_ProductVendor), new Notification(this.detach_ProductVendor)); } [Column(Storage="_UnitMeasureCode", DBType="NChar(3) NOT NULL", Id=true)] public string UnitMeasureCode { get { return this._UnitMeasureCode; } set { if ((this._UnitMeasureCode != value)) { this.OnPropertyChanging("UnitMeasureCode"); this._UnitMeasureCode = value; this.OnPropertyChanged("UnitMeasureCode"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_BillOfMaterials_UnitMeasure_UnitMeasureCode", Storage="_BillOfMaterials", OtherKey="UnitMeasureCode")] public EntitySet BillOfMaterials { get { return this._BillOfMaterials; } set { this._BillOfMaterials.Assign(value); } } [Association(Name="FK_Product_UnitMeasure_SizeUnitMeasureCode", Storage="_UnitMeasureCodeProduct", OtherKey="SizeUnitMeasureCode")] public EntitySet UnitMeasureCodeProduct { get { return this._UnitMeasureCodeProduct; } set { this._UnitMeasureCodeProduct.Assign(value); } } [Association(Name="FK_Product_UnitMeasure_WeightUnitMeasureCode", Storage="_ProductUnitMeasureWeightUnitMeasureCode", OtherKey="WeightUnitMeasureCode")] public EntitySet ProductUnitMeasureWeightUnitMeasureCode { get { return this._ProductUnitMeasureWeightUnitMeasureCode; } set { this._ProductUnitMeasureWeightUnitMeasureCode.Assign(value); } } [Association(Name="FK_ProductVendor_UnitMeasure_UnitMeasureCode", Storage="_ProductVendor", OtherKey="UnitMeasureCode")] public EntitySet ProductVendor { get { return this._ProductVendor; } set { this._ProductVendor.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_BillOfMaterials(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.UnitMeasure = this; this.OnPropertyChanged(null); } private void detach_BillOfMaterials(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.UnitMeasure = null; this.OnPropertyChanged(null); } private void attach_UnitMeasureCodeProduct(Product entity) { this.OnPropertyChanging(null); entity.SizeUnitMeasureCodeUnitMeasure = this; this.OnPropertyChanged(null); } private void detach_UnitMeasureCodeProduct(Product entity) { this.OnPropertyChanging(null); entity.SizeUnitMeasureCodeUnitMeasure = null; this.OnPropertyChanged(null); } private void attach_ProductUnitMeasureWeightUnitMeasureCode(Product entity) { this.OnPropertyChanging(null); entity.WeightUnitMeasureCodeUnitMeasure = this; this.OnPropertyChanged(null); } private void detach_ProductUnitMeasureWeightUnitMeasureCode(Product entity) { this.OnPropertyChanging(null); entity.WeightUnitMeasureCodeUnitMeasure = null; this.OnPropertyChanged(null); } private void attach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.UnitMeasure = this; this.OnPropertyChanged(null); } private void detach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.UnitMeasure = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[WorkOrder]")] public partial class WorkOrder : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _WorkOrderID; private int _ProductID; private int _OrderQty; private short _ScrappedQty; private System.DateTime _StartDate; private System.Nullable _EndDate; private System.DateTime _DueDate; private System.Nullable _ScrapReasonID; private System.DateTime _ModifiedDate; private int _StockedQty; private EntityRef _Product; private EntityRef _ScrapReason; private EntitySet _WorkOrderRouting; public WorkOrder() { this._StockedQty = default(int); this._Product = default(EntityRef); this._ScrapReason = default(EntityRef); this._WorkOrderRouting = new EntitySet(new Notification(this.attach_WorkOrderRouting), new Notification(this.detach_WorkOrderRouting)); } [Column(Storage="_WorkOrderID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int WorkOrderID { get { return this._WorkOrderID; } set { if ((this._WorkOrderID != value)) { this.OnPropertyChanging("WorkOrderID"); this._WorkOrderID = value; this.OnPropertyChanged("WorkOrderID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_OrderQty", DBType="Int NOT NULL")] public int OrderQty { get { return this._OrderQty; } set { if ((this._OrderQty != value)) { this.OnPropertyChanging("OrderQty"); this._OrderQty = value; this.OnPropertyChanged("OrderQty"); } } } [Column(Storage="_ScrappedQty", DBType="SmallInt NOT NULL")] public short ScrappedQty { get { return this._ScrappedQty; } set { if ((this._ScrappedQty != value)) { this.OnPropertyChanging("ScrappedQty"); this._ScrappedQty = value; this.OnPropertyChanged("ScrappedQty"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL")] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_DueDate", DBType="DateTime NOT NULL")] public System.DateTime DueDate { get { return this._DueDate; } set { if ((this._DueDate != value)) { this.OnPropertyChanging("DueDate"); this._DueDate = value; this.OnPropertyChanged("DueDate"); } } } [Column(Storage="_ScrapReasonID", DBType="SmallInt")] public System.Nullable ScrapReasonID { get { return this._ScrapReasonID; } set { if ((this._ScrapReasonID != value)) { this.OnPropertyChanging("ScrapReasonID"); this._ScrapReasonID = value; this.OnPropertyChanged("ScrapReasonID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Column(Storage="_StockedQty", DBType="Int NOT NULL")] public int StockedQty { get { return this._StockedQty; } } [Association(Name="FK_WorkOrder_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.WorkOrder.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.WorkOrder.Add(this); } this.OnPropertyChanged("Product"); } } } [Association(Name="FK_WorkOrder_ScrapReason_ScrapReasonID", Storage="_ScrapReason", ThisKey="ScrapReasonID", IsParent=true)] public ScrapReason ScrapReason { get { return this._ScrapReason.Entity; } set { ScrapReason v = this._ScrapReason.Entity; if ((v != value)) { this.OnPropertyChanging("ScrapReason"); if ((v != null)) { this._ScrapReason.Entity = null; v.WorkOrder.Remove(this); } this._ScrapReason.Entity = value; if ((value != null)) { value.WorkOrder.Add(this); } this.OnPropertyChanged("ScrapReason"); } } } [Association(Name="FK_WorkOrderRouting_WorkOrder_WorkOrderID", Storage="_WorkOrderRouting", OtherKey="WorkOrderID")] public EntitySet WorkOrderRouting { get { return this._WorkOrderRouting; } set { this._WorkOrderRouting.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_WorkOrderRouting(WorkOrderRouting entity) { this.OnPropertyChanging(null); entity.WorkOrder = this; this.OnPropertyChanged(null); } private void detach_WorkOrderRouting(WorkOrderRouting entity) { this.OnPropertyChanging(null); entity.WorkOrder = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[WorkOrderRouting]")] public partial class WorkOrderRouting : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _WorkOrderID; private int _ProductID; private short _OperationSequence; private short _LocationID; private System.DateTime _ScheduledStartDate; private System.DateTime _ScheduledEndDate; private System.Nullable _ActualStartDate; private System.Nullable _ActualEndDate; private System.Nullable _ActualResourceHrs; private decimal _PlannedCost; private System.Nullable _ActualCost; private System.DateTime _ModifiedDate; private EntityRef _Location; private EntityRef _WorkOrder; public WorkOrderRouting() { this._Location = default(EntityRef); this._WorkOrder = default(EntityRef); } [Column(Storage="_WorkOrderID", DBType="Int NOT NULL", Id=true)] public int WorkOrderID { get { return this._WorkOrderID; } set { if ((this._WorkOrderID != value)) { this.OnPropertyChanging("WorkOrderID"); this._WorkOrderID = value; this.OnPropertyChanged("WorkOrderID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_OperationSequence", DBType="SmallInt NOT NULL", Id=true)] public short OperationSequence { get { return this._OperationSequence; } set { if ((this._OperationSequence != value)) { this.OnPropertyChanging("OperationSequence"); this._OperationSequence = value; this.OnPropertyChanged("OperationSequence"); } } } [Column(Storage="_LocationID", DBType="SmallInt NOT NULL")] public short LocationID { get { return this._LocationID; } set { if ((this._LocationID != value)) { this.OnPropertyChanging("LocationID"); this._LocationID = value; this.OnPropertyChanged("LocationID"); } } } [Column(Storage="_ScheduledStartDate", DBType="DateTime NOT NULL")] public System.DateTime ScheduledStartDate { get { return this._ScheduledStartDate; } set { if ((this._ScheduledStartDate != value)) { this.OnPropertyChanging("ScheduledStartDate"); this._ScheduledStartDate = value; this.OnPropertyChanged("ScheduledStartDate"); } } } [Column(Storage="_ScheduledEndDate", DBType="DateTime NOT NULL")] public System.DateTime ScheduledEndDate { get { return this._ScheduledEndDate; } set { if ((this._ScheduledEndDate != value)) { this.OnPropertyChanging("ScheduledEndDate"); this._ScheduledEndDate = value; this.OnPropertyChanged("ScheduledEndDate"); } } } [Column(Storage="_ActualStartDate", DBType="DateTime")] public System.Nullable ActualStartDate { get { return this._ActualStartDate; } set { if ((this._ActualStartDate != value)) { this.OnPropertyChanging("ActualStartDate"); this._ActualStartDate = value; this.OnPropertyChanged("ActualStartDate"); } } } [Column(Storage="_ActualEndDate", DBType="DateTime")] public System.Nullable ActualEndDate { get { return this._ActualEndDate; } set { if ((this._ActualEndDate != value)) { this.OnPropertyChanging("ActualEndDate"); this._ActualEndDate = value; this.OnPropertyChanged("ActualEndDate"); } } } [Column(Storage="_ActualResourceHrs", DBType="Decimal(9,4)")] public System.Nullable ActualResourceHrs { get { return this._ActualResourceHrs; } set { if ((this._ActualResourceHrs != value)) { this.OnPropertyChanging("ActualResourceHrs"); this._ActualResourceHrs = value; this.OnPropertyChanged("ActualResourceHrs"); } } } [Column(Storage="_PlannedCost", DBType="Money NOT NULL")] public decimal PlannedCost { get { return this._PlannedCost; } set { if ((this._PlannedCost != value)) { this.OnPropertyChanging("PlannedCost"); this._PlannedCost = value; this.OnPropertyChanged("PlannedCost"); } } } [Column(Storage="_ActualCost", DBType="Money")] public System.Nullable ActualCost { get { return this._ActualCost; } set { if ((this._ActualCost != value)) { this.OnPropertyChanging("ActualCost"); this._ActualCost = value; this.OnPropertyChanged("ActualCost"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_WorkOrderRouting_Location_LocationID", Storage="_Location", ThisKey="LocationID", IsParent=true)] public Location Location { get { return this._Location.Entity; } set { Location v = this._Location.Entity; if ((v != value)) { this.OnPropertyChanging("Location"); if ((v != null)) { this._Location.Entity = null; v.WorkOrderRouting.Remove(this); } this._Location.Entity = value; if ((value != null)) { value.WorkOrderRouting.Add(this); } this.OnPropertyChanged("Location"); } } } [Association(Name="FK_WorkOrderRouting_WorkOrder_WorkOrderID", Storage="_WorkOrder", ThisKey="WorkOrderID", IsParent=true)] public WorkOrder WorkOrder { get { return this._WorkOrder.Entity; } set { WorkOrder v = this._WorkOrder.Entity; if ((v != value)) { this.OnPropertyChanging("WorkOrder"); if ((v != null)) { this._WorkOrder.Entity = null; v.WorkOrderRouting.Remove(this); } this._WorkOrder.Entity = value; if ((value != null)) { value.WorkOrderRouting.Add(this); } this.OnPropertyChanged("WorkOrder"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[Culture]")] public partial class Culture : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private string _CultureID; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _ProductModelProductDescriptionCulture; public Culture() { this._ProductModelProductDescriptionCulture = new EntitySet(new Notification(this.attach_ProductModelProductDescriptionCulture), new Notification(this.detach_ProductModelProductDescriptionCulture)); } [Column(Storage="_CultureID", DBType="NChar(6) NOT NULL", Id=true)] public string CultureID { get { return this._CultureID; } set { if ((this._CultureID != value)) { this.OnPropertyChanging("CultureID"); this._CultureID = value; this.OnPropertyChanged("CultureID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductModelProductDescriptionCulture_Culture_CultureID", Storage="_ProductModelProductDescriptionCulture", OtherKey="CultureID")] public EntitySet ProductModelProductDescriptionCulture { get { return this._ProductModelProductDescriptionCulture; } set { this._ProductModelProductDescriptionCulture.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.Culture = this; this.OnPropertyChanged(null); } private void detach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.Culture = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[Document]")] public partial class Document : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _DocumentID; private string _Title; private string _FileName; private string _FileExtension; private string _Revision; private int _ChangeNumber; private byte _Status; private string _DocumentSummary; private byte[] _Content; private System.DateTime _ModifiedDate; private EntitySet _ProductDocument; public Document() { this._ProductDocument = new EntitySet(new Notification(this.attach_ProductDocument), new Notification(this.detach_ProductDocument)); } [Column(Storage="_DocumentID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int DocumentID { get { return this._DocumentID; } set { if ((this._DocumentID != value)) { this.OnPropertyChanging("DocumentID"); this._DocumentID = value; this.OnPropertyChanged("DocumentID"); } } } [Column(Storage="_Title", DBType="NVarChar(50) NOT NULL")] public string Title { get { return this._Title; } set { if ((this._Title != value)) { this.OnPropertyChanging("Title"); this._Title = value; this.OnPropertyChanged("Title"); } } } [Column(Storage="_FileName", DBType="NVarChar(400) NOT NULL")] public string FileName { get { return this._FileName; } set { if ((this._FileName != value)) { this.OnPropertyChanging("FileName"); this._FileName = value; this.OnPropertyChanged("FileName"); } } } [Column(Storage="_FileExtension", DBType="NVarChar(8) NOT NULL")] public string FileExtension { get { return this._FileExtension; } set { if ((this._FileExtension != value)) { this.OnPropertyChanging("FileExtension"); this._FileExtension = value; this.OnPropertyChanged("FileExtension"); } } } [Column(Storage="_Revision", DBType="NChar(5) NOT NULL")] public string Revision { get { return this._Revision; } set { if ((this._Revision != value)) { this.OnPropertyChanging("Revision"); this._Revision = value; this.OnPropertyChanged("Revision"); } } } [Column(Storage="_ChangeNumber", DBType="Int NOT NULL")] public int ChangeNumber { get { return this._ChangeNumber; } set { if ((this._ChangeNumber != value)) { this.OnPropertyChanging("ChangeNumber"); this._ChangeNumber = value; this.OnPropertyChanged("ChangeNumber"); } } } [Column(Storage="_Status", DBType="TinyInt NOT NULL")] public byte Status { get { return this._Status; } set { if ((this._Status != value)) { this.OnPropertyChanging("Status"); this._Status = value; this.OnPropertyChanged("Status"); } } } [Column(Storage="_DocumentSummary", DBType="NVarChar(2147483647)", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string DocumentSummary { get { return this._DocumentSummary; } set { if ((this._DocumentSummary != value)) { this.OnPropertyChanging("DocumentSummary"); this._DocumentSummary = value; this.OnPropertyChanged("DocumentSummary"); } } } [Column(Name="Document", Storage="_Content", DBType="VarBinary(2147483647)", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public byte[] Content { get { return this._Content; } set { if ((this._Content != value)) { this.OnPropertyChanging("Content"); this._Content = value; this.OnPropertyChanged("Content"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductDocument_Document_DocumentID", Storage="_ProductDocument", OtherKey="DocumentID")] public EntitySet ProductDocument { get { return this._ProductDocument; } set { this._ProductDocument.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductDocument(ProductDocument entity) { this.OnPropertyChanging(null); entity.Document = this; this.OnPropertyChanged(null); } private void detach_ProductDocument(ProductDocument entity) { this.OnPropertyChanging(null); entity.Document = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[Illustration]")] public partial class Illustration : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _IllustrationID; private string _Diagram; private System.DateTime _ModifiedDate; private EntitySet _ProductModelIllustration; public Illustration() { this._ProductModelIllustration = new EntitySet(new Notification(this.attach_ProductModelIllustration), new Notification(this.detach_ProductModelIllustration)); } [Column(Storage="_IllustrationID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int IllustrationID { get { return this._IllustrationID; } set { if ((this._IllustrationID != value)) { this.OnPropertyChanging("IllustrationID"); this._IllustrationID = value; this.OnPropertyChanged("IllustrationID"); } } } [Column(Storage="_Diagram", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string Diagram { get { return this._Diagram; } set { if ((this._Diagram != value)) { this.OnPropertyChanging("Diagram"); this._Diagram = value; this.OnPropertyChanged("Diagram"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductModelIllustration_Illustration_IllustrationID", Storage="_ProductModelIllustration", OtherKey="IllustrationID")] public EntitySet ProductModelIllustration { get { return this._ProductModelIllustration; } set { this._ProductModelIllustration.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductModelIllustration(ProductModelIllustration entity) { this.OnPropertyChanging(null); entity.Illustration = this; this.OnPropertyChanged(null); } private void detach_ProductModelIllustration(ProductModelIllustration entity) { this.OnPropertyChanging(null); entity.Illustration = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[Location]")] public partial class Location : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private short _LocationID; private string _Name; private decimal _CostRate; private decimal _Availability; private System.DateTime _ModifiedDate; private EntitySet _ProductInventory; private EntitySet _WorkOrderRouting; public Location() { this._ProductInventory = new EntitySet(new Notification(this.attach_ProductInventory), new Notification(this.detach_ProductInventory)); this._WorkOrderRouting = new EntitySet(new Notification(this.attach_WorkOrderRouting), new Notification(this.detach_WorkOrderRouting)); } [Column(Storage="_LocationID", DBType="SmallInt NOT NULL IDENTITY", Id=true, AutoGen=true)] public short LocationID { get { return this._LocationID; } set { if ((this._LocationID != value)) { this.OnPropertyChanging("LocationID"); this._LocationID = value; this.OnPropertyChanged("LocationID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_CostRate", DBType="SmallMoney NOT NULL")] public decimal CostRate { get { return this._CostRate; } set { if ((this._CostRate != value)) { this.OnPropertyChanging("CostRate"); this._CostRate = value; this.OnPropertyChanged("CostRate"); } } } [Column(Storage="_Availability", DBType="Decimal(8,2) NOT NULL")] public decimal Availability { get { return this._Availability; } set { if ((this._Availability != value)) { this.OnPropertyChanging("Availability"); this._Availability = value; this.OnPropertyChanged("Availability"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductInventory_Location_LocationID", Storage="_ProductInventory", OtherKey="LocationID")] public EntitySet ProductInventory { get { return this._ProductInventory; } set { this._ProductInventory.Assign(value); } } [Association(Name="FK_WorkOrderRouting_Location_LocationID", Storage="_WorkOrderRouting", OtherKey="LocationID")] public EntitySet WorkOrderRouting { get { return this._WorkOrderRouting; } set { this._WorkOrderRouting.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductInventory(ProductInventory entity) { this.OnPropertyChanging(null); entity.Location = this; this.OnPropertyChanged(null); } private void detach_ProductInventory(ProductInventory entity) { this.OnPropertyChanging(null); entity.Location = null; this.OnPropertyChanged(null); } private void attach_WorkOrderRouting(WorkOrderRouting entity) { this.OnPropertyChanging(null); entity.Location = this; this.OnPropertyChanged(null); } private void detach_WorkOrderRouting(WorkOrderRouting entity) { this.OnPropertyChanging(null); entity.Location = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[Product]")] public partial class Product : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private string _Name; private string _ProductNumber; private bool _MakeFlag; private bool _FinishedGoodsFlag; private string _Color; private short _SafetyStockLevel; private short _ReorderPoint; private decimal _StandardCost; private decimal _ListPrice; private string _Size; private string _SizeUnitMeasureCode; private string _WeightUnitMeasureCode; private System.Nullable _Weight; private int _DaysToManufacture; private string _ProductLine; private string _Class; private string _Style; private System.Nullable _ProductSubcategoryID; private System.Nullable _ProductModelID; private System.DateTime _SellStartDate; private System.Nullable _SellEndDate; private System.Nullable _DiscontinuedDate; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _BillOfMaterialsProductComponentID; private EntitySet _BillOfMaterialsProductProductAssemblyID; private EntityRef _ProductModel; private EntityRef _ProductSubcategory; private EntityRef _SizeUnitMeasureCodeUnitMeasure; private EntityRef _WeightUnitMeasureCodeUnitMeasure; private EntitySet _ProductCostHistory; private EntitySet _ProductDocument; private EntitySet _ProductInventory; private EntitySet _ProductListPriceHistory; private EntitySet _ProductProductPhoto; private EntitySet _ProductReview; private EntitySet _TransactionHistory; private EntitySet _WorkOrder; private EntitySet _ProductVendor; private EntitySet _PurchaseOrderDetail; private EntitySet _ShoppingCartItem; private EntitySet _SpecialOfferProduct; public Product() { this._BillOfMaterialsProductComponentID = new EntitySet(new Notification(this.attach_BillOfMaterialsProductComponentID), new Notification(this.detach_BillOfMaterialsProductComponentID)); this._BillOfMaterialsProductProductAssemblyID = new EntitySet(new Notification(this.attach_BillOfMaterialsProductProductAssemblyID), new Notification(this.detach_BillOfMaterialsProductProductAssemblyID)); this._ProductModel = default(EntityRef); this._ProductSubcategory = default(EntityRef); this._SizeUnitMeasureCodeUnitMeasure = default(EntityRef); this._WeightUnitMeasureCodeUnitMeasure = default(EntityRef); this._ProductCostHistory = new EntitySet(new Notification(this.attach_ProductCostHistory), new Notification(this.detach_ProductCostHistory)); this._ProductDocument = new EntitySet(new Notification(this.attach_ProductDocument), new Notification(this.detach_ProductDocument)); this._ProductInventory = new EntitySet(new Notification(this.attach_ProductInventory), new Notification(this.detach_ProductInventory)); this._ProductListPriceHistory = new EntitySet(new Notification(this.attach_ProductListPriceHistory), new Notification(this.detach_ProductListPriceHistory)); this._ProductProductPhoto = new EntitySet(new Notification(this.attach_ProductProductPhoto), new Notification(this.detach_ProductProductPhoto)); this._ProductReview = new EntitySet(new Notification(this.attach_ProductReview), new Notification(this.detach_ProductReview)); this._TransactionHistory = new EntitySet(new Notification(this.attach_TransactionHistory), new Notification(this.detach_TransactionHistory)); this._WorkOrder = new EntitySet(new Notification(this.attach_WorkOrder), new Notification(this.detach_WorkOrder)); this._ProductVendor = new EntitySet(new Notification(this.attach_ProductVendor), new Notification(this.detach_ProductVendor)); this._PurchaseOrderDetail = new EntitySet(new Notification(this.attach_PurchaseOrderDetail), new Notification(this.detach_PurchaseOrderDetail)); this._ShoppingCartItem = new EntitySet(new Notification(this.attach_ShoppingCartItem), new Notification(this.detach_ShoppingCartItem)); this._SpecialOfferProduct = new EntitySet(new Notification(this.attach_SpecialOfferProduct), new Notification(this.detach_SpecialOfferProduct)); } [Column(Storage="_ProductID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ProductNumber", DBType="NVarChar(25) NOT NULL")] public string ProductNumber { get { return this._ProductNumber; } set { if ((this._ProductNumber != value)) { this.OnPropertyChanging("ProductNumber"); this._ProductNumber = value; this.OnPropertyChanged("ProductNumber"); } } } [Column(Storage="_MakeFlag", DBType="Bit NOT NULL")] public bool MakeFlag { get { return this._MakeFlag; } set { if ((this._MakeFlag != value)) { this.OnPropertyChanging("MakeFlag"); this._MakeFlag = value; this.OnPropertyChanged("MakeFlag"); } } } [Column(Storage="_FinishedGoodsFlag", DBType="Bit NOT NULL")] public bool FinishedGoodsFlag { get { return this._FinishedGoodsFlag; } set { if ((this._FinishedGoodsFlag != value)) { this.OnPropertyChanging("FinishedGoodsFlag"); this._FinishedGoodsFlag = value; this.OnPropertyChanged("FinishedGoodsFlag"); } } } [Column(Storage="_Color", DBType="NVarChar(15)")] public string Color { get { return this._Color; } set { if ((this._Color != value)) { this.OnPropertyChanging("Color"); this._Color = value; this.OnPropertyChanged("Color"); } } } [Column(Storage="_SafetyStockLevel", DBType="SmallInt NOT NULL")] public short SafetyStockLevel { get { return this._SafetyStockLevel; } set { if ((this._SafetyStockLevel != value)) { this.OnPropertyChanging("SafetyStockLevel"); this._SafetyStockLevel = value; this.OnPropertyChanged("SafetyStockLevel"); } } } [Column(Storage="_ReorderPoint", DBType="SmallInt NOT NULL")] public short ReorderPoint { get { return this._ReorderPoint; } set { if ((this._ReorderPoint != value)) { this.OnPropertyChanging("ReorderPoint"); this._ReorderPoint = value; this.OnPropertyChanged("ReorderPoint"); } } } [Column(Storage="_StandardCost", DBType="Money NOT NULL")] public decimal StandardCost { get { return this._StandardCost; } set { if ((this._StandardCost != value)) { this.OnPropertyChanging("StandardCost"); this._StandardCost = value; this.OnPropertyChanged("StandardCost"); } } } [Column(Storage="_ListPrice", DBType="Money NOT NULL")] public decimal ListPrice { get { return this._ListPrice; } set { if ((this._ListPrice != value)) { this.OnPropertyChanging("ListPrice"); this._ListPrice = value; this.OnPropertyChanged("ListPrice"); } } } [Column(Storage="_Size", DBType="NVarChar(5)")] public string Size { get { return this._Size; } set { if ((this._Size != value)) { this.OnPropertyChanging("Size"); this._Size = value; this.OnPropertyChanged("Size"); } } } [Column(Storage="_SizeUnitMeasureCode", DBType="NChar(3)")] public string SizeUnitMeasureCode { get { return this._SizeUnitMeasureCode; } set { if ((this._SizeUnitMeasureCode != value)) { this.OnPropertyChanging("SizeUnitMeasureCode"); this._SizeUnitMeasureCode = value; this.OnPropertyChanged("SizeUnitMeasureCode"); } } } [Column(Storage="_WeightUnitMeasureCode", DBType="NChar(3)")] public string WeightUnitMeasureCode { get { return this._WeightUnitMeasureCode; } set { if ((this._WeightUnitMeasureCode != value)) { this.OnPropertyChanging("WeightUnitMeasureCode"); this._WeightUnitMeasureCode = value; this.OnPropertyChanged("WeightUnitMeasureCode"); } } } [Column(Storage="_Weight", DBType="Decimal(8,2)")] public System.Nullable Weight { get { return this._Weight; } set { if ((this._Weight != value)) { this.OnPropertyChanging("Weight"); this._Weight = value; this.OnPropertyChanged("Weight"); } } } [Column(Storage="_DaysToManufacture", DBType="Int NOT NULL")] public int DaysToManufacture { get { return this._DaysToManufacture; } set { if ((this._DaysToManufacture != value)) { this.OnPropertyChanging("DaysToManufacture"); this._DaysToManufacture = value; this.OnPropertyChanged("DaysToManufacture"); } } } [Column(Storage="_ProductLine", DBType="NChar(2)")] public string ProductLine { get { return this._ProductLine; } set { if ((this._ProductLine != value)) { this.OnPropertyChanging("ProductLine"); this._ProductLine = value; this.OnPropertyChanged("ProductLine"); } } } [Column(Storage="_Class", DBType="NChar(2)")] public string Class { get { return this._Class; } set { if ((this._Class != value)) { this.OnPropertyChanging("Class"); this._Class = value; this.OnPropertyChanged("Class"); } } } [Column(Storage="_Style", DBType="NChar(2)")] public string Style { get { return this._Style; } set { if ((this._Style != value)) { this.OnPropertyChanging("Style"); this._Style = value; this.OnPropertyChanged("Style"); } } } [Column(Storage="_ProductSubcategoryID", DBType="Int")] public System.Nullable ProductSubcategoryID { get { return this._ProductSubcategoryID; } set { if ((this._ProductSubcategoryID != value)) { this.OnPropertyChanging("ProductSubcategoryID"); this._ProductSubcategoryID = value; this.OnPropertyChanged("ProductSubcategoryID"); } } } [Column(Storage="_ProductModelID", DBType="Int")] public System.Nullable ProductModelID { get { return this._ProductModelID; } set { if ((this._ProductModelID != value)) { this.OnPropertyChanging("ProductModelID"); this._ProductModelID = value; this.OnPropertyChanged("ProductModelID"); } } } [Column(Storage="_SellStartDate", DBType="DateTime NOT NULL")] public System.DateTime SellStartDate { get { return this._SellStartDate; } set { if ((this._SellStartDate != value)) { this.OnPropertyChanging("SellStartDate"); this._SellStartDate = value; this.OnPropertyChanged("SellStartDate"); } } } [Column(Storage="_SellEndDate", DBType="DateTime")] public System.Nullable SellEndDate { get { return this._SellEndDate; } set { if ((this._SellEndDate != value)) { this.OnPropertyChanging("SellEndDate"); this._SellEndDate = value; this.OnPropertyChanged("SellEndDate"); } } } [Column(Storage="_DiscontinuedDate", DBType="DateTime")] public System.Nullable DiscontinuedDate { get { return this._DiscontinuedDate; } set { if ((this._DiscontinuedDate != value)) { this.OnPropertyChanging("DiscontinuedDate"); this._DiscontinuedDate = value; this.OnPropertyChanged("DiscontinuedDate"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_BillOfMaterials_Product_ComponentID", Storage="_BillOfMaterialsProductComponentID", OtherKey="ComponentID")] public EntitySet BillOfMaterialsProductComponentID { get { return this._BillOfMaterialsProductComponentID; } set { this._BillOfMaterialsProductComponentID.Assign(value); } } [Association(Name="FK_BillOfMaterials_Product_ProductAssemblyID", Storage="_BillOfMaterialsProductProductAssemblyID", OtherKey="ProductAssemblyID")] public EntitySet BillOfMaterialsProductProductAssemblyID { get { return this._BillOfMaterialsProductProductAssemblyID; } set { this._BillOfMaterialsProductProductAssemblyID.Assign(value); } } [Association(Name="FK_Product_ProductModel_ProductModelID", Storage="_ProductModel", ThisKey="ProductModelID", IsParent=true)] public ProductModel ProductModel { get { return this._ProductModel.Entity; } set { ProductModel v = this._ProductModel.Entity; if ((v != value)) { this.OnPropertyChanging("ProductModel"); if ((v != null)) { this._ProductModel.Entity = null; v.Product.Remove(this); } this._ProductModel.Entity = value; if ((value != null)) { value.Product.Add(this); } this.OnPropertyChanged("ProductModel"); } } } [Association(Name="FK_Product_ProductSubcategory_ProductSubcategoryID", Storage="_ProductSubcategory", ThisKey="ProductSubcategoryID", IsParent=true)] public ProductSubcategory ProductSubcategory { get { return this._ProductSubcategory.Entity; } set { ProductSubcategory v = this._ProductSubcategory.Entity; if ((v != value)) { this.OnPropertyChanging("ProductSubcategory"); if ((v != null)) { this._ProductSubcategory.Entity = null; v.Product.Remove(this); } this._ProductSubcategory.Entity = value; if ((value != null)) { value.Product.Add(this); } this.OnPropertyChanged("ProductSubcategory"); } } } [Association(Name="FK_Product_UnitMeasure_SizeUnitMeasureCode", Storage="_SizeUnitMeasureCodeUnitMeasure", ThisKey="SizeUnitMeasureCode", IsParent=true)] public UnitMeasure SizeUnitMeasureCodeUnitMeasure { get { return this._SizeUnitMeasureCodeUnitMeasure.Entity; } set { UnitMeasure v = this._SizeUnitMeasureCodeUnitMeasure.Entity; if ((v != value)) { this.OnPropertyChanging("SizeUnitMeasureCodeUnitMeasure"); if ((v != null)) { this._SizeUnitMeasureCodeUnitMeasure.Entity = null; v.UnitMeasureCodeProduct.Remove(this); } this._SizeUnitMeasureCodeUnitMeasure.Entity = value; if ((value != null)) { value.UnitMeasureCodeProduct.Add(this); } this.OnPropertyChanged("SizeUnitMeasureCodeUnitMeasure"); } } } [Association(Name="FK_Product_UnitMeasure_WeightUnitMeasureCode", Storage="_WeightUnitMeasureCodeUnitMeasure", ThisKey="WeightUnitMeasureCode", IsParent=true)] public UnitMeasure WeightUnitMeasureCodeUnitMeasure { get { return this._WeightUnitMeasureCodeUnitMeasure.Entity; } set { UnitMeasure v = this._WeightUnitMeasureCodeUnitMeasure.Entity; if ((v != value)) { this.OnPropertyChanging("WeightUnitMeasureCodeUnitMeasure"); if ((v != null)) { this._WeightUnitMeasureCodeUnitMeasure.Entity = null; v.ProductUnitMeasureWeightUnitMeasureCode.Remove(this); } this._WeightUnitMeasureCodeUnitMeasure.Entity = value; if ((value != null)) { value.ProductUnitMeasureWeightUnitMeasureCode.Add(this); } this.OnPropertyChanged("WeightUnitMeasureCodeUnitMeasure"); } } } [Association(Name="FK_ProductCostHistory_Product_ProductID", Storage="_ProductCostHistory", OtherKey="ProductID")] public EntitySet ProductCostHistory { get { return this._ProductCostHistory; } set { this._ProductCostHistory.Assign(value); } } [Association(Name="FK_ProductDocument_Product_ProductID", Storage="_ProductDocument", OtherKey="ProductID")] public EntitySet ProductDocument { get { return this._ProductDocument; } set { this._ProductDocument.Assign(value); } } [Association(Name="FK_ProductInventory_Product_ProductID", Storage="_ProductInventory", OtherKey="ProductID")] public EntitySet ProductInventory { get { return this._ProductInventory; } set { this._ProductInventory.Assign(value); } } [Association(Name="FK_ProductListPriceHistory_Product_ProductID", Storage="_ProductListPriceHistory", OtherKey="ProductID")] public EntitySet ProductListPriceHistory { get { return this._ProductListPriceHistory; } set { this._ProductListPriceHistory.Assign(value); } } [Association(Name="FK_ProductProductPhoto_Product_ProductID", Storage="_ProductProductPhoto", OtherKey="ProductID")] public EntitySet ProductProductPhoto { get { return this._ProductProductPhoto; } set { this._ProductProductPhoto.Assign(value); } } [Association(Name="FK_ProductReview_Product_ProductID", Storage="_ProductReview", OtherKey="ProductID")] public EntitySet ProductReview { get { return this._ProductReview; } set { this._ProductReview.Assign(value); } } [Association(Name="FK_TransactionHistory_Product_ProductID", Storage="_TransactionHistory", OtherKey="ProductID")] public EntitySet TransactionHistory { get { return this._TransactionHistory; } set { this._TransactionHistory.Assign(value); } } [Association(Name="FK_WorkOrder_Product_ProductID", Storage="_WorkOrder", OtherKey="ProductID")] public EntitySet WorkOrder { get { return this._WorkOrder; } set { this._WorkOrder.Assign(value); } } [Association(Name="FK_ProductVendor_Product_ProductID", Storage="_ProductVendor", OtherKey="ProductID")] public EntitySet ProductVendor { get { return this._ProductVendor; } set { this._ProductVendor.Assign(value); } } [Association(Name="FK_PurchaseOrderDetail_Product_ProductID", Storage="_PurchaseOrderDetail", OtherKey="ProductID")] public EntitySet PurchaseOrderDetail { get { return this._PurchaseOrderDetail; } set { this._PurchaseOrderDetail.Assign(value); } } [Association(Name="FK_ShoppingCartItem_Product_ProductID", Storage="_ShoppingCartItem", OtherKey="ProductID")] public EntitySet ShoppingCartItem { get { return this._ShoppingCartItem; } set { this._ShoppingCartItem.Assign(value); } } [Association(Name="FK_SpecialOfferProduct_Product_ProductID", Storage="_SpecialOfferProduct", OtherKey="ProductID")] public EntitySet SpecialOfferProduct { get { return this._SpecialOfferProduct; } set { this._SpecialOfferProduct.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_BillOfMaterialsProductComponentID(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.Component = this; this.OnPropertyChanged(null); } private void detach_BillOfMaterialsProductComponentID(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.Component = null; this.OnPropertyChanged(null); } private void attach_BillOfMaterialsProductProductAssemblyID(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.ProductAssembly = this; this.OnPropertyChanged(null); } private void detach_BillOfMaterialsProductProductAssemblyID(BillOfMaterials entity) { this.OnPropertyChanging(null); entity.ProductAssembly = null; this.OnPropertyChanged(null); } private void attach_ProductCostHistory(ProductCostHistory entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductCostHistory(ProductCostHistory entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductDocument(ProductDocument entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductDocument(ProductDocument entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductInventory(ProductInventory entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductInventory(ProductInventory entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductListPriceHistory(ProductListPriceHistory entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductListPriceHistory(ProductListPriceHistory entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductProductPhoto(ProductProductPhoto entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductProductPhoto(ProductProductPhoto entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductReview(ProductReview entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductReview(ProductReview entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_TransactionHistory(TransactionHistory entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_TransactionHistory(TransactionHistory entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_WorkOrder(WorkOrder entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_WorkOrder(WorkOrder entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_PurchaseOrderDetail(PurchaseOrderDetail entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_PurchaseOrderDetail(PurchaseOrderDetail entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_ShoppingCartItem(ShoppingCartItem entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_ShoppingCartItem(ShoppingCartItem entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } private void attach_SpecialOfferProduct(SpecialOfferProduct entity) { this.OnPropertyChanging(null); entity.Product = this; this.OnPropertyChanged(null); } private void detach_SpecialOfferProduct(SpecialOfferProduct entity) { this.OnPropertyChanging(null); entity.Product = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[ScrapReason]")] public partial class ScrapReason : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private short _ScrapReasonID; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _WorkOrder; public ScrapReason() { this._WorkOrder = new EntitySet(new Notification(this.attach_WorkOrder), new Notification(this.detach_WorkOrder)); } [Column(Storage="_ScrapReasonID", DBType="SmallInt NOT NULL IDENTITY", Id=true, AutoGen=true)] public short ScrapReasonID { get { return this._ScrapReasonID; } set { if ((this._ScrapReasonID != value)) { this.OnPropertyChanging("ScrapReasonID"); this._ScrapReasonID = value; this.OnPropertyChanged("ScrapReasonID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_WorkOrder_ScrapReason_ScrapReasonID", Storage="_WorkOrder", OtherKey="ScrapReasonID")] public EntitySet WorkOrder { get { return this._WorkOrder; } set { this._WorkOrder.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_WorkOrder(WorkOrder entity) { this.OnPropertyChanging(null); entity.ScrapReason = this; this.OnPropertyChanged(null); } private void detach_WorkOrder(WorkOrder entity) { this.OnPropertyChanging(null); entity.ScrapReason = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[ProductCategory]")] public partial class ProductCategory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductCategoryID; private string _Name; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _ProductSubcategory; public ProductCategory() { this._ProductSubcategory = new EntitySet(new Notification(this.attach_ProductSubcategory), new Notification(this.detach_ProductSubcategory)); } [Column(Storage="_ProductCategoryID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductCategoryID { get { return this._ProductCategoryID; } set { if ((this._ProductCategoryID != value)) { this.OnPropertyChanging("ProductCategoryID"); this._ProductCategoryID = value; this.OnPropertyChanged("ProductCategoryID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductSubcategory_ProductCategory_ProductCategoryID", Storage="_ProductSubcategory", OtherKey="ProductCategoryID")] public EntitySet ProductSubcategory { get { return this._ProductSubcategory; } set { this._ProductSubcategory.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductSubcategory(ProductSubcategory entity) { this.OnPropertyChanging(null); entity.ProductCategory = this; this.OnPropertyChanged(null); } private void detach_ProductSubcategory(ProductSubcategory entity) { this.OnPropertyChanging(null); entity.ProductCategory = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[ProductCostHistory]")] public partial class ProductCostHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private System.DateTime _StartDate; private System.Nullable _EndDate; private decimal _StandardCost; private System.DateTime _ModifiedDate; private EntityRef _Product; public ProductCostHistory() { this._Product = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_StandardCost", DBType="Money NOT NULL")] public decimal StandardCost { get { return this._StandardCost; } set { if ((this._StandardCost != value)) { this.OnPropertyChanging("StandardCost"); this._StandardCost = value; this.OnPropertyChanged("StandardCost"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductCostHistory_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductCostHistory.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductCostHistory.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductDescription]")] public partial class ProductDescription : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductDescriptionID; private string _Description; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _ProductModelProductDescriptionCulture; public ProductDescription() { this._ProductModelProductDescriptionCulture = new EntitySet(new Notification(this.attach_ProductModelProductDescriptionCulture), new Notification(this.detach_ProductModelProductDescriptionCulture)); } [Column(Storage="_ProductDescriptionID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductDescriptionID { get { return this._ProductDescriptionID; } set { if ((this._ProductDescriptionID != value)) { this.OnPropertyChanging("ProductDescriptionID"); this._ProductDescriptionID = value; this.OnPropertyChanged("ProductDescriptionID"); } } } [Column(Storage="_Description", DBType="NVarChar(400) NOT NULL")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnPropertyChanging("Description"); this._Description = value; this.OnPropertyChanged("Description"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID", Storage="_ProductModelProductDescriptionCulture", OtherKey="ProductDescriptionID")] public EntitySet ProductModelProductDescriptionCulture { get { return this._ProductModelProductDescriptionCulture; } set { this._ProductModelProductDescriptionCulture.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.ProductDescription = this; this.OnPropertyChanged(null); } private void detach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.ProductDescription = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[ProductDocument]")] public partial class ProductDocument : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private int _DocumentID; private System.DateTime _ModifiedDate; private EntityRef _Document; private EntityRef _Product; public ProductDocument() { this._Document = default(EntityRef); this._Product = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_DocumentID", DBType="Int NOT NULL", Id=true)] public int DocumentID { get { return this._DocumentID; } set { if ((this._DocumentID != value)) { this.OnPropertyChanging("DocumentID"); this._DocumentID = value; this.OnPropertyChanged("DocumentID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductDocument_Document_DocumentID", Storage="_Document", ThisKey="DocumentID", IsParent=true)] public Document Document { get { return this._Document.Entity; } set { Document v = this._Document.Entity; if ((v != value)) { this.OnPropertyChanging("Document"); if ((v != null)) { this._Document.Entity = null; v.ProductDocument.Remove(this); } this._Document.Entity = value; if ((value != null)) { value.ProductDocument.Add(this); } this.OnPropertyChanged("Document"); } } } [Association(Name="FK_ProductDocument_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductDocument.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductDocument.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductInventory]")] public partial class ProductInventory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private short _LocationID; private string _Shelf; private byte _Bin; private short _Quantity; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _Location; private EntityRef _Product; public ProductInventory() { this._Location = default(EntityRef); this._Product = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_LocationID", DBType="SmallInt NOT NULL", Id=true)] public short LocationID { get { return this._LocationID; } set { if ((this._LocationID != value)) { this.OnPropertyChanging("LocationID"); this._LocationID = value; this.OnPropertyChanged("LocationID"); } } } [Column(Storage="_Shelf", DBType="NVarChar(10) NOT NULL")] public string Shelf { get { return this._Shelf; } set { if ((this._Shelf != value)) { this.OnPropertyChanging("Shelf"); this._Shelf = value; this.OnPropertyChanged("Shelf"); } } } [Column(Storage="_Bin", DBType="TinyInt NOT NULL")] public byte Bin { get { return this._Bin; } set { if ((this._Bin != value)) { this.OnPropertyChanging("Bin"); this._Bin = value; this.OnPropertyChanged("Bin"); } } } [Column(Storage="_Quantity", DBType="SmallInt NOT NULL")] public short Quantity { get { return this._Quantity; } set { if ((this._Quantity != value)) { this.OnPropertyChanging("Quantity"); this._Quantity = value; this.OnPropertyChanged("Quantity"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductInventory_Location_LocationID", Storage="_Location", ThisKey="LocationID", IsParent=true)] public Location Location { get { return this._Location.Entity; } set { Location v = this._Location.Entity; if ((v != value)) { this.OnPropertyChanging("Location"); if ((v != null)) { this._Location.Entity = null; v.ProductInventory.Remove(this); } this._Location.Entity = value; if ((value != null)) { value.ProductInventory.Add(this); } this.OnPropertyChanged("Location"); } } } [Association(Name="FK_ProductInventory_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductInventory.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductInventory.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductListPriceHistory]")] public partial class ProductListPriceHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private System.DateTime _StartDate; private System.Nullable _EndDate; private decimal _ListPrice; private System.DateTime _ModifiedDate; private EntityRef _Product; public ProductListPriceHistory() { this._Product = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_ListPrice", DBType="Money NOT NULL")] public decimal ListPrice { get { return this._ListPrice; } set { if ((this._ListPrice != value)) { this.OnPropertyChanging("ListPrice"); this._ListPrice = value; this.OnPropertyChanged("ListPrice"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductListPriceHistory_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductListPriceHistory.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductListPriceHistory.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductModel]")] public partial class ProductModel : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductModelID; private string _Name; private string _CatalogDescription; private string _Instructions; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _Product; private EntitySet _ProductModelIllustration; private EntitySet _ProductModelProductDescriptionCulture; public ProductModel() { this._Product = new EntitySet(new Notification(this.attach_Product), new Notification(this.detach_Product)); this._ProductModelIllustration = new EntitySet(new Notification(this.attach_ProductModelIllustration), new Notification(this.detach_ProductModelIllustration)); this._ProductModelProductDescriptionCulture = new EntitySet(new Notification(this.attach_ProductModelProductDescriptionCulture), new Notification(this.detach_ProductModelProductDescriptionCulture)); } [Column(Storage="_ProductModelID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductModelID { get { return this._ProductModelID; } set { if ((this._ProductModelID != value)) { this.OnPropertyChanging("ProductModelID"); this._ProductModelID = value; this.OnPropertyChanged("ProductModelID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_CatalogDescription", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string CatalogDescription { get { return this._CatalogDescription; } set { if ((this._CatalogDescription != value)) { this.OnPropertyChanging("CatalogDescription"); this._CatalogDescription = value; this.OnPropertyChanged("CatalogDescription"); } } } [Column(Storage="_Instructions", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string Instructions { get { return this._Instructions; } set { if ((this._Instructions != value)) { this.OnPropertyChanging("Instructions"); this._Instructions = value; this.OnPropertyChanged("Instructions"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Product_ProductModel_ProductModelID", Storage="_Product", OtherKey="ProductModelID")] public EntitySet Product { get { return this._Product; } set { this._Product.Assign(value); } } [Association(Name="FK_ProductModelIllustration_ProductModel_ProductModelID", Storage="_ProductModelIllustration", OtherKey="ProductModelID")] public EntitySet ProductModelIllustration { get { return this._ProductModelIllustration; } set { this._ProductModelIllustration.Assign(value); } } [Association(Name="FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID", Storage="_ProductModelProductDescriptionCulture", OtherKey="ProductModelID")] public EntitySet ProductModelProductDescriptionCulture { get { return this._ProductModelProductDescriptionCulture; } set { this._ProductModelProductDescriptionCulture.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_Product(Product entity) { this.OnPropertyChanging(null); entity.ProductModel = this; this.OnPropertyChanged(null); } private void detach_Product(Product entity) { this.OnPropertyChanging(null); entity.ProductModel = null; this.OnPropertyChanged(null); } private void attach_ProductModelIllustration(ProductModelIllustration entity) { this.OnPropertyChanging(null); entity.ProductModel = this; this.OnPropertyChanged(null); } private void detach_ProductModelIllustration(ProductModelIllustration entity) { this.OnPropertyChanging(null); entity.ProductModel = null; this.OnPropertyChanged(null); } private void attach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.ProductModel = this; this.OnPropertyChanged(null); } private void detach_ProductModelProductDescriptionCulture(ProductModelProductDescriptionCulture entity) { this.OnPropertyChanging(null); entity.ProductModel = null; this.OnPropertyChanged(null); } } [Table(Name="[Production].[ProductModelIllustration]")] public partial class ProductModelIllustration : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductModelID; private int _IllustrationID; private System.DateTime _ModifiedDate; private EntityRef _Illustration; private EntityRef _ProductModel; public ProductModelIllustration() { this._Illustration = default(EntityRef); this._ProductModel = default(EntityRef); } [Column(Storage="_ProductModelID", DBType="Int NOT NULL", Id=true)] public int ProductModelID { get { return this._ProductModelID; } set { if ((this._ProductModelID != value)) { this.OnPropertyChanging("ProductModelID"); this._ProductModelID = value; this.OnPropertyChanged("ProductModelID"); } } } [Column(Storage="_IllustrationID", DBType="Int NOT NULL", Id=true)] public int IllustrationID { get { return this._IllustrationID; } set { if ((this._IllustrationID != value)) { this.OnPropertyChanging("IllustrationID"); this._IllustrationID = value; this.OnPropertyChanged("IllustrationID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductModelIllustration_Illustration_IllustrationID", Storage="_Illustration", ThisKey="IllustrationID", IsParent=true)] public Illustration Illustration { get { return this._Illustration.Entity; } set { Illustration v = this._Illustration.Entity; if ((v != value)) { this.OnPropertyChanging("Illustration"); if ((v != null)) { this._Illustration.Entity = null; v.ProductModelIllustration.Remove(this); } this._Illustration.Entity = value; if ((value != null)) { value.ProductModelIllustration.Add(this); } this.OnPropertyChanged("Illustration"); } } } [Association(Name="FK_ProductModelIllustration_ProductModel_ProductModelID", Storage="_ProductModel", ThisKey="ProductModelID", IsParent=true)] public ProductModel ProductModel { get { return this._ProductModel.Entity; } set { ProductModel v = this._ProductModel.Entity; if ((v != value)) { this.OnPropertyChanging("ProductModel"); if ((v != null)) { this._ProductModel.Entity = null; v.ProductModelIllustration.Remove(this); } this._ProductModel.Entity = value; if ((value != null)) { value.ProductModelIllustration.Add(this); } this.OnPropertyChanged("ProductModel"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductModelProductDescriptionCulture]")] public partial class ProductModelProductDescriptionCulture : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductModelID; private int _ProductDescriptionID; private string _CultureID; private System.DateTime _ModifiedDate; private EntityRef _Culture; private EntityRef _ProductDescription; private EntityRef _ProductModel; public ProductModelProductDescriptionCulture() { this._Culture = default(EntityRef); this._ProductDescription = default(EntityRef); this._ProductModel = default(EntityRef); } [Column(Storage="_ProductModelID", DBType="Int NOT NULL", Id=true)] public int ProductModelID { get { return this._ProductModelID; } set { if ((this._ProductModelID != value)) { this.OnPropertyChanging("ProductModelID"); this._ProductModelID = value; this.OnPropertyChanged("ProductModelID"); } } } [Column(Storage="_ProductDescriptionID", DBType="Int NOT NULL", Id=true)] public int ProductDescriptionID { get { return this._ProductDescriptionID; } set { if ((this._ProductDescriptionID != value)) { this.OnPropertyChanging("ProductDescriptionID"); this._ProductDescriptionID = value; this.OnPropertyChanged("ProductDescriptionID"); } } } [Column(Storage="_CultureID", DBType="NChar(6) NOT NULL", Id=true)] public string CultureID { get { return this._CultureID; } set { if ((this._CultureID != value)) { this.OnPropertyChanging("CultureID"); this._CultureID = value; this.OnPropertyChanged("CultureID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductModelProductDescriptionCulture_Culture_CultureID", Storage="_Culture", ThisKey="CultureID", IsParent=true)] public Culture Culture { get { return this._Culture.Entity; } set { Culture v = this._Culture.Entity; if ((v != value)) { this.OnPropertyChanging("Culture"); if ((v != null)) { this._Culture.Entity = null; v.ProductModelProductDescriptionCulture.Remove(this); } this._Culture.Entity = value; if ((value != null)) { value.ProductModelProductDescriptionCulture.Add(this); } this.OnPropertyChanged("Culture"); } } } [Association(Name="FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID", Storage="_ProductDescription", ThisKey="ProductDescriptionID", IsParent=true)] public ProductDescription ProductDescription { get { return this._ProductDescription.Entity; } set { ProductDescription v = this._ProductDescription.Entity; if ((v != value)) { this.OnPropertyChanging("ProductDescription"); if ((v != null)) { this._ProductDescription.Entity = null; v.ProductModelProductDescriptionCulture.Remove(this); } this._ProductDescription.Entity = value; if ((value != null)) { value.ProductModelProductDescriptionCulture.Add(this); } this.OnPropertyChanged("ProductDescription"); } } } [Association(Name="FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID", Storage="_ProductModel", ThisKey="ProductModelID", IsParent=true)] public ProductModel ProductModel { get { return this._ProductModel.Entity; } set { ProductModel v = this._ProductModel.Entity; if ((v != value)) { this.OnPropertyChanging("ProductModel"); if ((v != null)) { this._ProductModel.Entity = null; v.ProductModelProductDescriptionCulture.Remove(this); } this._ProductModel.Entity = value; if ((value != null)) { value.ProductModelProductDescriptionCulture.Add(this); } this.OnPropertyChanged("ProductModel"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Production].[ProductPhoto]")] public partial class ProductPhoto : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductPhotoID; private byte[] _ThumbNailPhoto; private string _ThumbnailPhotoFileName; private byte[] _LargePhoto; private string _LargePhotoFileName; private System.DateTime _ModifiedDate; private EntitySet _ProductProductPhoto; public ProductPhoto() { this._ProductProductPhoto = new EntitySet(new Notification(this.attach_ProductProductPhoto), new Notification(this.detach_ProductProductPhoto)); } [Column(Storage="_ProductPhotoID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ProductPhotoID { get { return this._ProductPhotoID; } set { if ((this._ProductPhotoID != value)) { this.OnPropertyChanging("ProductPhotoID"); this._ProductPhotoID = value; this.OnPropertyChanged("ProductPhotoID"); } } } [Column(Storage="_ThumbNailPhoto", DBType="VarBinary(2147483647)", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public byte[] ThumbNailPhoto { get { return this._ThumbNailPhoto; } set { if ((this._ThumbNailPhoto != value)) { this.OnPropertyChanging("ThumbNailPhoto"); this._ThumbNailPhoto = value; this.OnPropertyChanged("ThumbNailPhoto"); } } } [Column(Storage="_ThumbnailPhotoFileName", DBType="NVarChar(50)")] public string ThumbnailPhotoFileName { get { return this._ThumbnailPhotoFileName; } set { if ((this._ThumbnailPhotoFileName != value)) { this.OnPropertyChanging("ThumbnailPhotoFileName"); this._ThumbnailPhotoFileName = value; this.OnPropertyChanged("ThumbnailPhotoFileName"); } } } [Column(Storage="_LargePhoto", DBType="VarBinary(2147483647)", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public byte[] LargePhoto { get { return this._LargePhoto; } set { if ((this._LargePhoto != value)) { this.OnPropertyChanging("LargePhoto"); this._LargePhoto = value; this.OnPropertyChanged("LargePhoto"); } } } [Column(Storage="_LargePhotoFileName", DBType="NVarChar(50)")] public string LargePhotoFileName { get { return this._LargePhotoFileName; } set { if ((this._LargePhotoFileName != value)) { this.OnPropertyChanging("LargePhotoFileName"); this._LargePhotoFileName = value; this.OnPropertyChanged("LargePhotoFileName"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductProductPhoto_ProductPhoto_ProductPhotoID", Storage="_ProductProductPhoto", OtherKey="ProductPhotoID")] public EntitySet ProductProductPhoto { get { return this._ProductProductPhoto; } set { this._ProductProductPhoto.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductProductPhoto(ProductProductPhoto entity) { this.OnPropertyChanging(null); entity.ProductPhoto = this; this.OnPropertyChanged(null); } private void detach_ProductProductPhoto(ProductProductPhoto entity) { this.OnPropertyChanging(null); entity.ProductPhoto = null; this.OnPropertyChanged(null); } } public partial class Sales : Schema { public Table StoreContact; public Table ContactCreditCard; public Table CountryRegionCurrency; public Table CreditCard; public Table Currency; public Table SalesOrderDetail; public Table CurrencyRate; public Table Customer; public Table SalesOrderHeader; public Table CustomerAddress; public Table SalesOrderHeaderSalesReason; public Table SalesPerson; public Table SalesPersonQuotaHistory; public Table SalesReason; public Table Individual; public Table SalesTaxRate; public Table SalesTerritory; public Table SalesTerritoryHistory; public Table ShoppingCartItem; public Table SpecialOffer; public Table SpecialOfferProduct; public Table Store; public Sales(DataContext context) : base(context) { } } [Table(Name="[Sales].[StoreContact]")] public partial class StoreContact : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CustomerID; private int _ContactID; private int _ContactTypeID; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _Contact; private EntityRef _ContactType; private EntityRef _Store; public StoreContact() { this._Contact = default(EntityRef); this._ContactType = default(EntityRef); this._Store = default(EntityRef); } [Column(Storage="_CustomerID", DBType="Int NOT NULL", Id=true)] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_ContactID", DBType="Int NOT NULL", Id=true)] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_ContactTypeID", DBType="Int NOT NULL")] public int ContactTypeID { get { return this._ContactTypeID; } set { if ((this._ContactTypeID != value)) { this.OnPropertyChanging("ContactTypeID"); this._ContactTypeID = value; this.OnPropertyChanged("ContactTypeID"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_StoreContact_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.StoreContact.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.StoreContact.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_StoreContact_ContactType_ContactTypeID", Storage="_ContactType", ThisKey="ContactTypeID", IsParent=true)] public ContactType ContactType { get { return this._ContactType.Entity; } set { ContactType v = this._ContactType.Entity; if ((v != value)) { this.OnPropertyChanging("ContactType"); if ((v != null)) { this._ContactType.Entity = null; v.StoreContact.Remove(this); } this._ContactType.Entity = value; if ((value != null)) { value.StoreContact.Add(this); } this.OnPropertyChanged("ContactType"); } } } [Association(Name="FK_StoreContact_Store_CustomerID", Storage="_Store", ThisKey="CustomerID", IsParent=true)] public Store Store { get { return this._Store.Entity; } set { Store v = this._Store.Entity; if ((v != value)) { this.OnPropertyChanging("Store"); if ((v != null)) { this._Store.Entity = null; v.StoreContact.Remove(this); } this._Store.Entity = value; if ((value != null)) { value.StoreContact.Add(this); } this.OnPropertyChanged("Store"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[ContactCreditCard]")] public partial class ContactCreditCard : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ContactID; private int _CreditCardID; private System.DateTime _ModifiedDate; private EntityRef _Contact; private EntityRef _CreditCard; public ContactCreditCard() { this._Contact = default(EntityRef); this._CreditCard = default(EntityRef); } [Column(Storage="_ContactID", DBType="Int NOT NULL", Id=true)] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_CreditCardID", DBType="Int NOT NULL", Id=true)] public int CreditCardID { get { return this._CreditCardID; } set { if ((this._CreditCardID != value)) { this.OnPropertyChanging("CreditCardID"); this._CreditCardID = value; this.OnPropertyChanged("CreditCardID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ContactCreditCard_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.ContactCreditCard.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.ContactCreditCard.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_ContactCreditCard_CreditCard_CreditCardID", Storage="_CreditCard", ThisKey="CreditCardID", IsParent=true)] public CreditCard CreditCard { get { return this._CreditCard.Entity; } set { CreditCard v = this._CreditCard.Entity; if ((v != value)) { this.OnPropertyChanging("CreditCard"); if ((v != null)) { this._CreditCard.Entity = null; v.ContactCreditCard.Remove(this); } this._CreditCard.Entity = value; if ((value != null)) { value.ContactCreditCard.Add(this); } this.OnPropertyChanged("CreditCard"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[CountryRegionCurrency]")] public partial class CountryRegionCurrency : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private string _CountryRegionCode; private string _CurrencyCode; private System.DateTime _ModifiedDate; private EntityRef _CountryRegion; private EntityRef _Currency; public CountryRegionCurrency() { this._CountryRegion = default(EntityRef); this._Currency = default(EntityRef); } [Column(Storage="_CountryRegionCode", DBType="NVarChar(3) NOT NULL", Id=true)] public string CountryRegionCode { get { return this._CountryRegionCode; } set { if ((this._CountryRegionCode != value)) { this.OnPropertyChanging("CountryRegionCode"); this._CountryRegionCode = value; this.OnPropertyChanged("CountryRegionCode"); } } } [Column(Storage="_CurrencyCode", DBType="NChar(3) NOT NULL", Id=true)] public string CurrencyCode { get { return this._CurrencyCode; } set { if ((this._CurrencyCode != value)) { this.OnPropertyChanging("CurrencyCode"); this._CurrencyCode = value; this.OnPropertyChanged("CurrencyCode"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_CountryRegionCurrency_CountryRegion_CountryRegionCode", Storage="_CountryRegion", ThisKey="CountryRegionCode", IsParent=true)] public CountryRegion CountryRegion { get { return this._CountryRegion.Entity; } set { CountryRegion v = this._CountryRegion.Entity; if ((v != value)) { this.OnPropertyChanging("CountryRegion"); if ((v != null)) { this._CountryRegion.Entity = null; v.CountryRegionCurrency.Remove(this); } this._CountryRegion.Entity = value; if ((value != null)) { value.CountryRegionCurrency.Add(this); } this.OnPropertyChanged("CountryRegion"); } } } [Association(Name="FK_CountryRegionCurrency_Currency_CurrencyCode", Storage="_Currency", ThisKey="CurrencyCode", IsParent=true)] public Currency Currency { get { return this._Currency.Entity; } set { Currency v = this._Currency.Entity; if ((v != value)) { this.OnPropertyChanging("Currency"); if ((v != null)) { this._Currency.Entity = null; v.CountryRegionCurrency.Remove(this); } this._Currency.Entity = value; if ((value != null)) { value.CountryRegionCurrency.Add(this); } this.OnPropertyChanged("Currency"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[CreditCard]")] public partial class CreditCard : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CreditCardID; private string _CardType; private string _CardNumber; private byte _ExpMonth; private short _ExpYear; private System.DateTime _ModifiedDate; private EntitySet _ContactCreditCard; private EntitySet _SalesOrderHeader; public CreditCard() { this._ContactCreditCard = new EntitySet(new Notification(this.attach_ContactCreditCard), new Notification(this.detach_ContactCreditCard)); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); } [Column(Storage="_CreditCardID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int CreditCardID { get { return this._CreditCardID; } set { if ((this._CreditCardID != value)) { this.OnPropertyChanging("CreditCardID"); this._CreditCardID = value; this.OnPropertyChanged("CreditCardID"); } } } [Column(Storage="_CardType", DBType="NVarChar(50) NOT NULL")] public string CardType { get { return this._CardType; } set { if ((this._CardType != value)) { this.OnPropertyChanging("CardType"); this._CardType = value; this.OnPropertyChanged("CardType"); } } } [Column(Storage="_CardNumber", DBType="NVarChar(25) NOT NULL")] public string CardNumber { get { return this._CardNumber; } set { if ((this._CardNumber != value)) { this.OnPropertyChanging("CardNumber"); this._CardNumber = value; this.OnPropertyChanged("CardNumber"); } } } [Column(Storage="_ExpMonth", DBType="TinyInt NOT NULL")] public byte ExpMonth { get { return this._ExpMonth; } set { if ((this._ExpMonth != value)) { this.OnPropertyChanging("ExpMonth"); this._ExpMonth = value; this.OnPropertyChanged("ExpMonth"); } } } [Column(Storage="_ExpYear", DBType="SmallInt NOT NULL")] public short ExpYear { get { return this._ExpYear; } set { if ((this._ExpYear != value)) { this.OnPropertyChanging("ExpYear"); this._ExpYear = value; this.OnPropertyChanged("ExpYear"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ContactCreditCard_CreditCard_CreditCardID", Storage="_ContactCreditCard", OtherKey="CreditCardID")] public EntitySet ContactCreditCard { get { return this._ContactCreditCard; } set { this._ContactCreditCard.Assign(value); } } [Association(Name="FK_SalesOrderHeader_CreditCard_CreditCardID", Storage="_SalesOrderHeader", OtherKey="CreditCardID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ContactCreditCard(ContactCreditCard entity) { this.OnPropertyChanging(null); entity.CreditCard = this; this.OnPropertyChanged(null); } private void detach_ContactCreditCard(ContactCreditCard entity) { this.OnPropertyChanging(null); entity.CreditCard = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.CreditCard = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.CreditCard = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[Currency]")] public partial class Currency : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private string _CurrencyCode; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _CountryRegionCurrency; private EntitySet _CurrencyCodeCurrencyRate; private EntitySet _CurrencyRateCurrencyToCurrencyCode; public Currency() { this._CountryRegionCurrency = new EntitySet(new Notification(this.attach_CountryRegionCurrency), new Notification(this.detach_CountryRegionCurrency)); this._CurrencyCodeCurrencyRate = new EntitySet(new Notification(this.attach_CurrencyCodeCurrencyRate), new Notification(this.detach_CurrencyCodeCurrencyRate)); this._CurrencyRateCurrencyToCurrencyCode = new EntitySet(new Notification(this.attach_CurrencyRateCurrencyToCurrencyCode), new Notification(this.detach_CurrencyRateCurrencyToCurrencyCode)); } [Column(Storage="_CurrencyCode", DBType="NChar(3) NOT NULL", Id=true)] public string CurrencyCode { get { return this._CurrencyCode; } set { if ((this._CurrencyCode != value)) { this.OnPropertyChanging("CurrencyCode"); this._CurrencyCode = value; this.OnPropertyChanged("CurrencyCode"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_CountryRegionCurrency_Currency_CurrencyCode", Storage="_CountryRegionCurrency", OtherKey="CurrencyCode")] public EntitySet CountryRegionCurrency { get { return this._CountryRegionCurrency; } set { this._CountryRegionCurrency.Assign(value); } } [Association(Name="FK_CurrencyRate_Currency_FromCurrencyCode", Storage="_CurrencyCodeCurrencyRate", OtherKey="FromCurrencyCode")] public EntitySet CurrencyCodeCurrencyRate { get { return this._CurrencyCodeCurrencyRate; } set { this._CurrencyCodeCurrencyRate.Assign(value); } } [Association(Name="FK_CurrencyRate_Currency_ToCurrencyCode", Storage="_CurrencyRateCurrencyToCurrencyCode", OtherKey="ToCurrencyCode")] public EntitySet CurrencyRateCurrencyToCurrencyCode { get { return this._CurrencyRateCurrencyToCurrencyCode; } set { this._CurrencyRateCurrencyToCurrencyCode.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_CountryRegionCurrency(CountryRegionCurrency entity) { this.OnPropertyChanging(null); entity.Currency = this; this.OnPropertyChanged(null); } private void detach_CountryRegionCurrency(CountryRegionCurrency entity) { this.OnPropertyChanging(null); entity.Currency = null; this.OnPropertyChanged(null); } private void attach_CurrencyCodeCurrencyRate(CurrencyRate entity) { this.OnPropertyChanging(null); entity.FromCurrencyCodeCurrency = this; this.OnPropertyChanged(null); } private void detach_CurrencyCodeCurrencyRate(CurrencyRate entity) { this.OnPropertyChanging(null); entity.FromCurrencyCodeCurrency = null; this.OnPropertyChanged(null); } private void attach_CurrencyRateCurrencyToCurrencyCode(CurrencyRate entity) { this.OnPropertyChanging(null); entity.ToCurrencyCodeCurrency = this; this.OnPropertyChanged(null); } private void detach_CurrencyRateCurrencyToCurrencyCode(CurrencyRate entity) { this.OnPropertyChanging(null); entity.ToCurrencyCodeCurrency = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[SalesOrderDetail]")] public partial class SalesOrderDetail : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesOrderID; private int _SalesOrderDetailID; private string _CarrierTrackingNumber; private short _OrderQty; private int _ProductID; private int _SpecialOfferID; private decimal _UnitPrice; private decimal _UnitPriceDiscount; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private decimal _LineTotal; private EntityRef _SalesOrderHeader; private EntityRef _SpecialOfferProduct; public SalesOrderDetail() { this._LineTotal = default(decimal); this._SalesOrderHeader = default(EntityRef); this._SpecialOfferProduct = default(EntityRef); } [Column(Storage="_SalesOrderID", DBType="Int NOT NULL", Id=true)] public int SalesOrderID { get { return this._SalesOrderID; } set { if ((this._SalesOrderID != value)) { this.OnPropertyChanging("SalesOrderID"); this._SalesOrderID = value; this.OnPropertyChanged("SalesOrderID"); } } } [Column(Storage="_SalesOrderDetailID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int SalesOrderDetailID { get { return this._SalesOrderDetailID; } set { if ((this._SalesOrderDetailID != value)) { this.OnPropertyChanging("SalesOrderDetailID"); this._SalesOrderDetailID = value; this.OnPropertyChanged("SalesOrderDetailID"); } } } [Column(Storage="_CarrierTrackingNumber", DBType="NVarChar(25)")] public string CarrierTrackingNumber { get { return this._CarrierTrackingNumber; } set { if ((this._CarrierTrackingNumber != value)) { this.OnPropertyChanging("CarrierTrackingNumber"); this._CarrierTrackingNumber = value; this.OnPropertyChanged("CarrierTrackingNumber"); } } } [Column(Storage="_OrderQty", DBType="SmallInt NOT NULL")] public short OrderQty { get { return this._OrderQty; } set { if ((this._OrderQty != value)) { this.OnPropertyChanging("OrderQty"); this._OrderQty = value; this.OnPropertyChanged("OrderQty"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_SpecialOfferID", DBType="Int NOT NULL")] public int SpecialOfferID { get { return this._SpecialOfferID; } set { if ((this._SpecialOfferID != value)) { this.OnPropertyChanging("SpecialOfferID"); this._SpecialOfferID = value; this.OnPropertyChanged("SpecialOfferID"); } } } [Column(Storage="_UnitPrice", DBType="Money NOT NULL")] public decimal UnitPrice { get { return this._UnitPrice; } set { if ((this._UnitPrice != value)) { this.OnPropertyChanging("UnitPrice"); this._UnitPrice = value; this.OnPropertyChanged("UnitPrice"); } } } [Column(Storage="_UnitPriceDiscount", DBType="Money NOT NULL")] public decimal UnitPriceDiscount { get { return this._UnitPriceDiscount; } set { if ((this._UnitPriceDiscount != value)) { this.OnPropertyChanging("UnitPriceDiscount"); this._UnitPriceDiscount = value; this.OnPropertyChanged("UnitPriceDiscount"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Column(Storage="_LineTotal", DBType="Decimal(38,6) NOT NULL")] public decimal LineTotal { get { return this._LineTotal; } } [Association(Name="FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", Storage="_SalesOrderHeader", ThisKey="SalesOrderID", IsParent=true)] public SalesOrderHeader SalesOrderHeader { get { return this._SalesOrderHeader.Entity; } set { SalesOrderHeader v = this._SalesOrderHeader.Entity; if ((v != value)) { this.OnPropertyChanging("SalesOrderHeader"); if ((v != null)) { this._SalesOrderHeader.Entity = null; v.SalesOrderDetail.Remove(this); } this._SalesOrderHeader.Entity = value; if ((value != null)) { value.SalesOrderDetail.Add(this); } this.OnPropertyChanged("SalesOrderHeader"); } } } [Association(Name="FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID", Storage="_SpecialOfferProduct", ThisKey="SpecialOfferID, ProductID", IsParent=true)] public SpecialOfferProduct SpecialOfferProduct { get { return this._SpecialOfferProduct.Entity; } set { SpecialOfferProduct v = this._SpecialOfferProduct.Entity; if ((v != value)) { this.OnPropertyChanging("SpecialOfferProduct"); if ((v != null)) { this._SpecialOfferProduct.Entity = null; v.SalesOrderDetail.Remove(this); } this._SpecialOfferProduct.Entity = value; if ((value != null)) { value.SalesOrderDetail.Add(this); } this.OnPropertyChanged("SpecialOfferProduct"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[CurrencyRate]")] public partial class CurrencyRate : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CurrencyRateID; private System.DateTime _CurrencyRateDate; private string _FromCurrencyCode; private string _ToCurrencyCode; private decimal _AverageRate; private decimal _EndOfDayRate; private System.DateTime _ModifiedDate; private EntityRef _FromCurrencyCodeCurrency; private EntityRef _ToCurrencyCodeCurrency; private EntitySet _SalesOrderHeader; public CurrencyRate() { this._FromCurrencyCodeCurrency = default(EntityRef); this._ToCurrencyCodeCurrency = default(EntityRef); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); } [Column(Storage="_CurrencyRateID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int CurrencyRateID { get { return this._CurrencyRateID; } set { if ((this._CurrencyRateID != value)) { this.OnPropertyChanging("CurrencyRateID"); this._CurrencyRateID = value; this.OnPropertyChanged("CurrencyRateID"); } } } [Column(Storage="_CurrencyRateDate", DBType="DateTime NOT NULL")] public System.DateTime CurrencyRateDate { get { return this._CurrencyRateDate; } set { if ((this._CurrencyRateDate != value)) { this.OnPropertyChanging("CurrencyRateDate"); this._CurrencyRateDate = value; this.OnPropertyChanged("CurrencyRateDate"); } } } [Column(Storage="_FromCurrencyCode", DBType="NChar(3) NOT NULL")] public string FromCurrencyCode { get { return this._FromCurrencyCode; } set { if ((this._FromCurrencyCode != value)) { this.OnPropertyChanging("FromCurrencyCode"); this._FromCurrencyCode = value; this.OnPropertyChanged("FromCurrencyCode"); } } } [Column(Storage="_ToCurrencyCode", DBType="NChar(3) NOT NULL")] public string ToCurrencyCode { get { return this._ToCurrencyCode; } set { if ((this._ToCurrencyCode != value)) { this.OnPropertyChanging("ToCurrencyCode"); this._ToCurrencyCode = value; this.OnPropertyChanged("ToCurrencyCode"); } } } [Column(Storage="_AverageRate", DBType="Money NOT NULL")] public decimal AverageRate { get { return this._AverageRate; } set { if ((this._AverageRate != value)) { this.OnPropertyChanging("AverageRate"); this._AverageRate = value; this.OnPropertyChanged("AverageRate"); } } } [Column(Storage="_EndOfDayRate", DBType="Money NOT NULL")] public decimal EndOfDayRate { get { return this._EndOfDayRate; } set { if ((this._EndOfDayRate != value)) { this.OnPropertyChanging("EndOfDayRate"); this._EndOfDayRate = value; this.OnPropertyChanged("EndOfDayRate"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_CurrencyRate_Currency_FromCurrencyCode", Storage="_FromCurrencyCodeCurrency", ThisKey="FromCurrencyCode", IsParent=true)] public Currency FromCurrencyCodeCurrency { get { return this._FromCurrencyCodeCurrency.Entity; } set { Currency v = this._FromCurrencyCodeCurrency.Entity; if ((v != value)) { this.OnPropertyChanging("FromCurrencyCodeCurrency"); if ((v != null)) { this._FromCurrencyCodeCurrency.Entity = null; v.CurrencyCodeCurrencyRate.Remove(this); } this._FromCurrencyCodeCurrency.Entity = value; if ((value != null)) { value.CurrencyCodeCurrencyRate.Add(this); } this.OnPropertyChanged("FromCurrencyCodeCurrency"); } } } [Association(Name="FK_CurrencyRate_Currency_ToCurrencyCode", Storage="_ToCurrencyCodeCurrency", ThisKey="ToCurrencyCode", IsParent=true)] public Currency ToCurrencyCodeCurrency { get { return this._ToCurrencyCodeCurrency.Entity; } set { Currency v = this._ToCurrencyCodeCurrency.Entity; if ((v != value)) { this.OnPropertyChanging("ToCurrencyCodeCurrency"); if ((v != null)) { this._ToCurrencyCodeCurrency.Entity = null; v.CurrencyRateCurrencyToCurrencyCode.Remove(this); } this._ToCurrencyCodeCurrency.Entity = value; if ((value != null)) { value.CurrencyRateCurrencyToCurrencyCode.Add(this); } this.OnPropertyChanged("ToCurrencyCodeCurrency"); } } } [Association(Name="FK_SalesOrderHeader_CurrencyRate_CurrencyRateID", Storage="_SalesOrderHeader", OtherKey="CurrencyRateID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.CurrencyRate = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.CurrencyRate = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[Customer]")] public partial class Customer : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CustomerID; private System.Nullable _TerritoryID; private string _AccountNumber; private string _CustomerType; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _SalesTerritory; private EntitySet _CustomerAddress; private EntityRef _Individual; private EntitySet _SalesOrderHeader; private EntityRef _Store; public Customer() { this._AccountNumber = default(string); this._SalesTerritory = default(EntityRef); this._CustomerAddress = new EntitySet(new Notification(this.attach_CustomerAddress), new Notification(this.detach_CustomerAddress)); this._Individual = default(EntityRef); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); this._Store = default(EntityRef); } [Column(Storage="_CustomerID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_TerritoryID", DBType="Int")] public System.Nullable TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Storage="_AccountNumber", DBType="VarChar(10) NOT NULL")] public string AccountNumber { get { return this._AccountNumber; } } [Column(Storage="_CustomerType", DBType="NChar(1) NOT NULL")] public string CustomerType { get { return this._CustomerType; } set { if ((this._CustomerType != value)) { this.OnPropertyChanging("CustomerType"); this._CustomerType = value; this.OnPropertyChanged("CustomerType"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Customer_SalesTerritory_TerritoryID", Storage="_SalesTerritory", ThisKey="TerritoryID", IsParent=true)] public SalesTerritory SalesTerritory { get { return this._SalesTerritory.Entity; } set { SalesTerritory v = this._SalesTerritory.Entity; if ((v != value)) { this.OnPropertyChanging("SalesTerritory"); if ((v != null)) { this._SalesTerritory.Entity = null; v.Customer.Remove(this); } this._SalesTerritory.Entity = value; if ((value != null)) { value.Customer.Add(this); } this.OnPropertyChanged("SalesTerritory"); } } } [Association(Name="FK_CustomerAddress_Customer_CustomerID", Storage="_CustomerAddress", OtherKey="CustomerID")] public EntitySet CustomerAddress { get { return this._CustomerAddress; } set { this._CustomerAddress.Assign(value); } } [Association(Name="FK_Individual_Customer_CustomerID", Storage="_Individual", ThisKey="CustomerID", Unique=true)] public Individual Individual { get { return this._Individual.Entity; } set { Individual v = this._Individual.Entity; if ((v != value)) { this.OnPropertyChanging("Individual"); if ((v != null)) { this._Individual.Entity = null; v.Customer = null; } this._Individual.Entity = value; if ((value != null)) { value.Customer = this; } this.OnPropertyChanged("Individual"); } } } [Association(Name="FK_SalesOrderHeader_Customer_CustomerID", Storage="_SalesOrderHeader", OtherKey="CustomerID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } [Association(Name="FK_Store_Customer_CustomerID", Storage="_Store", ThisKey="CustomerID", Unique=true)] public Store Store { get { return this._Store.Entity; } set { Store v = this._Store.Entity; if ((v != value)) { this.OnPropertyChanging("Store"); if ((v != null)) { this._Store.Entity = null; v.Customer = null; } this._Store.Entity = value; if ((value != null)) { value.Customer = this; } this.OnPropertyChanged("Store"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.Customer = this; this.OnPropertyChanged(null); } private void detach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.Customer = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.Customer = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.Customer = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[SalesOrderHeader]")] public partial class SalesOrderHeader : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesOrderID; private byte _RevisionNumber; private System.DateTime _OrderDate; private System.DateTime _DueDate; private System.Nullable _ShipDate; private byte _Status; private bool _OnlineOrderFlag; private string _SalesOrderNumber; private string _PurchaseOrderNumber; private string _AccountNumber; private int _CustomerID; private int _ContactID; private System.Nullable _SalesPersonID; private System.Nullable _TerritoryID; private int _BillToAddressID; private int _ShipToAddressID; private int _ShipMethodID; private System.Nullable _CreditCardID; private string _CreditCardApprovalCode; private System.Nullable _CurrencyRateID; private decimal _SubTotal; private decimal _TaxAmt; private decimal _Freight; private decimal _TotalDue; private string _Comment; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _SalesOrderDetail; private EntityRef
_BillToAddress; private EntityRef
_ShipToAddress; private EntityRef _Contact; private EntityRef _CreditCard; private EntityRef _CurrencyRate; private EntityRef _Customer; private EntityRef _SalesPerson; private EntityRef _SalesTerritory; private EntityRef _ShipMethod; private EntitySet _SalesOrderHeaderSalesReason; public SalesOrderHeader() { this._SalesOrderNumber = default(string); this._TotalDue = default(decimal); this._SalesOrderDetail = new EntitySet(new Notification(this.attach_SalesOrderDetail), new Notification(this.detach_SalesOrderDetail)); this._BillToAddress = default(EntityRef
); this._ShipToAddress = default(EntityRef
); this._Contact = default(EntityRef); this._CreditCard = default(EntityRef); this._CurrencyRate = default(EntityRef); this._Customer = default(EntityRef); this._SalesPerson = default(EntityRef); this._SalesTerritory = default(EntityRef); this._ShipMethod = default(EntityRef); this._SalesOrderHeaderSalesReason = new EntitySet(new Notification(this.attach_SalesOrderHeaderSalesReason), new Notification(this.detach_SalesOrderHeaderSalesReason)); } [Column(Storage="_SalesOrderID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int SalesOrderID { get { return this._SalesOrderID; } set { if ((this._SalesOrderID != value)) { this.OnPropertyChanging("SalesOrderID"); this._SalesOrderID = value; this.OnPropertyChanged("SalesOrderID"); } } } [Column(Storage="_RevisionNumber", DBType="TinyInt NOT NULL")] public byte RevisionNumber { get { return this._RevisionNumber; } set { if ((this._RevisionNumber != value)) { this.OnPropertyChanging("RevisionNumber"); this._RevisionNumber = value; this.OnPropertyChanged("RevisionNumber"); } } } [Column(Storage="_OrderDate", DBType="DateTime NOT NULL")] public System.DateTime OrderDate { get { return this._OrderDate; } set { if ((this._OrderDate != value)) { this.OnPropertyChanging("OrderDate"); this._OrderDate = value; this.OnPropertyChanged("OrderDate"); } } } [Column(Storage="_DueDate", DBType="DateTime NOT NULL")] public System.DateTime DueDate { get { return this._DueDate; } set { if ((this._DueDate != value)) { this.OnPropertyChanging("DueDate"); this._DueDate = value; this.OnPropertyChanged("DueDate"); } } } [Column(Storage="_ShipDate", DBType="DateTime")] public System.Nullable ShipDate { get { return this._ShipDate; } set { if ((this._ShipDate != value)) { this.OnPropertyChanging("ShipDate"); this._ShipDate = value; this.OnPropertyChanged("ShipDate"); } } } [Column(Storage="_Status", DBType="TinyInt NOT NULL")] public byte Status { get { return this._Status; } set { if ((this._Status != value)) { this.OnPropertyChanging("Status"); this._Status = value; this.OnPropertyChanged("Status"); } } } [Column(Storage="_OnlineOrderFlag", DBType="Bit NOT NULL")] public bool OnlineOrderFlag { get { return this._OnlineOrderFlag; } set { if ((this._OnlineOrderFlag != value)) { this.OnPropertyChanging("OnlineOrderFlag"); this._OnlineOrderFlag = value; this.OnPropertyChanged("OnlineOrderFlag"); } } } [Column(Storage="_SalesOrderNumber", DBType="NVarChar(25) NOT NULL")] public string SalesOrderNumber { get { return this._SalesOrderNumber; } } [Column(Storage="_PurchaseOrderNumber", DBType="NVarChar(25)")] public string PurchaseOrderNumber { get { return this._PurchaseOrderNumber; } set { if ((this._PurchaseOrderNumber != value)) { this.OnPropertyChanging("PurchaseOrderNumber"); this._PurchaseOrderNumber = value; this.OnPropertyChanged("PurchaseOrderNumber"); } } } [Column(Storage="_AccountNumber", DBType="NVarChar(15)")] public string AccountNumber { get { return this._AccountNumber; } set { if ((this._AccountNumber != value)) { this.OnPropertyChanging("AccountNumber"); this._AccountNumber = value; this.OnPropertyChanged("AccountNumber"); } } } [Column(Storage="_CustomerID", DBType="Int NOT NULL")] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_ContactID", DBType="Int NOT NULL")] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_SalesPersonID", DBType="Int")] public System.Nullable SalesPersonID { get { return this._SalesPersonID; } set { if ((this._SalesPersonID != value)) { this.OnPropertyChanging("SalesPersonID"); this._SalesPersonID = value; this.OnPropertyChanged("SalesPersonID"); } } } [Column(Storage="_TerritoryID", DBType="Int")] public System.Nullable TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Storage="_BillToAddressID", DBType="Int NOT NULL")] public int BillToAddressID { get { return this._BillToAddressID; } set { if ((this._BillToAddressID != value)) { this.OnPropertyChanging("BillToAddressID"); this._BillToAddressID = value; this.OnPropertyChanged("BillToAddressID"); } } } [Column(Storage="_ShipToAddressID", DBType="Int NOT NULL")] public int ShipToAddressID { get { return this._ShipToAddressID; } set { if ((this._ShipToAddressID != value)) { this.OnPropertyChanging("ShipToAddressID"); this._ShipToAddressID = value; this.OnPropertyChanged("ShipToAddressID"); } } } [Column(Storage="_ShipMethodID", DBType="Int NOT NULL")] public int ShipMethodID { get { return this._ShipMethodID; } set { if ((this._ShipMethodID != value)) { this.OnPropertyChanging("ShipMethodID"); this._ShipMethodID = value; this.OnPropertyChanged("ShipMethodID"); } } } [Column(Storage="_CreditCardID", DBType="Int")] public System.Nullable CreditCardID { get { return this._CreditCardID; } set { if ((this._CreditCardID != value)) { this.OnPropertyChanging("CreditCardID"); this._CreditCardID = value; this.OnPropertyChanged("CreditCardID"); } } } [Column(Storage="_CreditCardApprovalCode", DBType="VarChar(15)")] public string CreditCardApprovalCode { get { return this._CreditCardApprovalCode; } set { if ((this._CreditCardApprovalCode != value)) { this.OnPropertyChanging("CreditCardApprovalCode"); this._CreditCardApprovalCode = value; this.OnPropertyChanged("CreditCardApprovalCode"); } } } [Column(Storage="_CurrencyRateID", DBType="Int")] public System.Nullable CurrencyRateID { get { return this._CurrencyRateID; } set { if ((this._CurrencyRateID != value)) { this.OnPropertyChanging("CurrencyRateID"); this._CurrencyRateID = value; this.OnPropertyChanged("CurrencyRateID"); } } } [Column(Storage="_SubTotal", DBType="Money NOT NULL")] public decimal SubTotal { get { return this._SubTotal; } set { if ((this._SubTotal != value)) { this.OnPropertyChanging("SubTotal"); this._SubTotal = value; this.OnPropertyChanged("SubTotal"); } } } [Column(Storage="_TaxAmt", DBType="Money NOT NULL")] public decimal TaxAmt { get { return this._TaxAmt; } set { if ((this._TaxAmt != value)) { this.OnPropertyChanging("TaxAmt"); this._TaxAmt = value; this.OnPropertyChanged("TaxAmt"); } } } [Column(Storage="_Freight", DBType="Money NOT NULL")] public decimal Freight { get { return this._Freight; } set { if ((this._Freight != value)) { this.OnPropertyChanging("Freight"); this._Freight = value; this.OnPropertyChanged("Freight"); } } } [Column(Storage="_TotalDue", DBType="Money NOT NULL")] public decimal TotalDue { get { return this._TotalDue; } } [Column(Storage="_Comment", DBType="NVarChar(128)")] public string Comment { get { return this._Comment; } set { if ((this._Comment != value)) { this.OnPropertyChanging("Comment"); this._Comment = value; this.OnPropertyChanged("Comment"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID", Storage="_SalesOrderDetail", OtherKey="SalesOrderID")] public EntitySet SalesOrderDetail { get { return this._SalesOrderDetail; } set { this._SalesOrderDetail.Assign(value); } } [Association(Name="FK_SalesOrderHeader_Address_BillToAddressID", Storage="_BillToAddress", ThisKey="BillToAddressID", IsParent=true)] public Address BillToAddress { get { return this._BillToAddress.Entity; } set { Address v = this._BillToAddress.Entity; if ((v != value)) { this.OnPropertyChanging("BillToAddress"); if ((v != null)) { this._BillToAddress.Entity = null; v.SalesOrderHeaderAddressBillToAddressID.Remove(this); } this._BillToAddress.Entity = value; if ((value != null)) { value.SalesOrderHeaderAddressBillToAddressID.Add(this); } this.OnPropertyChanged("BillToAddress"); } } } [Association(Name="FK_SalesOrderHeader_Address_ShipToAddressID", Storage="_ShipToAddress", ThisKey="ShipToAddressID", IsParent=true)] public Address ShipToAddress { get { return this._ShipToAddress.Entity; } set { Address v = this._ShipToAddress.Entity; if ((v != value)) { this.OnPropertyChanging("ShipToAddress"); if ((v != null)) { this._ShipToAddress.Entity = null; v.SalesOrderHeaderAddressShipToAddressID.Remove(this); } this._ShipToAddress.Entity = value; if ((value != null)) { value.SalesOrderHeaderAddressShipToAddressID.Add(this); } this.OnPropertyChanged("ShipToAddress"); } } } [Association(Name="FK_SalesOrderHeader_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.SalesOrderHeader.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_SalesOrderHeader_CreditCard_CreditCardID", Storage="_CreditCard", ThisKey="CreditCardID", IsParent=true)] public CreditCard CreditCard { get { return this._CreditCard.Entity; } set { CreditCard v = this._CreditCard.Entity; if ((v != value)) { this.OnPropertyChanging("CreditCard"); if ((v != null)) { this._CreditCard.Entity = null; v.SalesOrderHeader.Remove(this); } this._CreditCard.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("CreditCard"); } } } [Association(Name="FK_SalesOrderHeader_CurrencyRate_CurrencyRateID", Storage="_CurrencyRate", ThisKey="CurrencyRateID", IsParent=true)] public CurrencyRate CurrencyRate { get { return this._CurrencyRate.Entity; } set { CurrencyRate v = this._CurrencyRate.Entity; if ((v != value)) { this.OnPropertyChanging("CurrencyRate"); if ((v != null)) { this._CurrencyRate.Entity = null; v.SalesOrderHeader.Remove(this); } this._CurrencyRate.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("CurrencyRate"); } } } [Association(Name="FK_SalesOrderHeader_Customer_CustomerID", Storage="_Customer", ThisKey="CustomerID", IsParent=true)] public Customer Customer { get { return this._Customer.Entity; } set { Customer v = this._Customer.Entity; if ((v != value)) { this.OnPropertyChanging("Customer"); if ((v != null)) { this._Customer.Entity = null; v.SalesOrderHeader.Remove(this); } this._Customer.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("Customer"); } } } [Association(Name="FK_SalesOrderHeader_SalesPerson_SalesPersonID", Storage="_SalesPerson", ThisKey="SalesPersonID", IsParent=true)] public SalesPerson SalesPerson { get { return this._SalesPerson.Entity; } set { SalesPerson v = this._SalesPerson.Entity; if ((v != value)) { this.OnPropertyChanging("SalesPerson"); if ((v != null)) { this._SalesPerson.Entity = null; v.SalesOrderHeader.Remove(this); } this._SalesPerson.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("SalesPerson"); } } } [Association(Name="FK_SalesOrderHeader_SalesTerritory_TerritoryID", Storage="_SalesTerritory", ThisKey="TerritoryID", IsParent=true)] public SalesTerritory SalesTerritory { get { return this._SalesTerritory.Entity; } set { SalesTerritory v = this._SalesTerritory.Entity; if ((v != value)) { this.OnPropertyChanging("SalesTerritory"); if ((v != null)) { this._SalesTerritory.Entity = null; v.SalesOrderHeader.Remove(this); } this._SalesTerritory.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("SalesTerritory"); } } } [Association(Name="FK_SalesOrderHeader_ShipMethod_ShipMethodID", Storage="_ShipMethod", ThisKey="ShipMethodID", IsParent=true)] public ShipMethod ShipMethod { get { return this._ShipMethod.Entity; } set { ShipMethod v = this._ShipMethod.Entity; if ((v != value)) { this.OnPropertyChanging("ShipMethod"); if ((v != null)) { this._ShipMethod.Entity = null; v.SalesOrderHeader.Remove(this); } this._ShipMethod.Entity = value; if ((value != null)) { value.SalesOrderHeader.Add(this); } this.OnPropertyChanged("ShipMethod"); } } } [Association(Name="FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID", Storage="_SalesOrderHeaderSalesReason", OtherKey="SalesOrderID")] public EntitySet SalesOrderHeaderSalesReason { get { return this._SalesOrderHeaderSalesReason; } set { this._SalesOrderHeaderSalesReason.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SalesOrderDetail(SalesOrderDetail entity) { this.OnPropertyChanging(null); entity.SalesOrderHeader = this; this.OnPropertyChanged(null); } private void detach_SalesOrderDetail(SalesOrderDetail entity) { this.OnPropertyChanging(null); entity.SalesOrderHeader = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeaderSalesReason(SalesOrderHeaderSalesReason entity) { this.OnPropertyChanging(null); entity.SalesOrderHeader = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeaderSalesReason(SalesOrderHeaderSalesReason entity) { this.OnPropertyChanging(null); entity.SalesOrderHeader = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[CustomerAddress]")] public partial class CustomerAddress : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CustomerID; private int _AddressID; private int _AddressTypeID; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef
_Address; private EntityRef _AddressType; private EntityRef _Customer; public CustomerAddress() { this._Address = default(EntityRef
); this._AddressType = default(EntityRef); this._Customer = default(EntityRef); } [Column(Storage="_CustomerID", DBType="Int NOT NULL", Id=true)] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_AddressID", DBType="Int NOT NULL", Id=true)] public int AddressID { get { return this._AddressID; } set { if ((this._AddressID != value)) { this.OnPropertyChanging("AddressID"); this._AddressID = value; this.OnPropertyChanged("AddressID"); } } } [Column(Storage="_AddressTypeID", DBType="Int NOT NULL")] public int AddressTypeID { get { return this._AddressTypeID; } set { if ((this._AddressTypeID != value)) { this.OnPropertyChanging("AddressTypeID"); this._AddressTypeID = value; this.OnPropertyChanged("AddressTypeID"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_CustomerAddress_Address_AddressID", Storage="_Address", ThisKey="AddressID", IsParent=true)] public Address Address { get { return this._Address.Entity; } set { Address v = this._Address.Entity; if ((v != value)) { this.OnPropertyChanging("Address"); if ((v != null)) { this._Address.Entity = null; v.CustomerAddress.Remove(this); } this._Address.Entity = value; if ((value != null)) { value.CustomerAddress.Add(this); } this.OnPropertyChanged("Address"); } } } [Association(Name="FK_CustomerAddress_AddressType_AddressTypeID", Storage="_AddressType", ThisKey="AddressTypeID", IsParent=true)] public AddressType AddressType { get { return this._AddressType.Entity; } set { AddressType v = this._AddressType.Entity; if ((v != value)) { this.OnPropertyChanging("AddressType"); if ((v != null)) { this._AddressType.Entity = null; v.CustomerAddress.Remove(this); } this._AddressType.Entity = value; if ((value != null)) { value.CustomerAddress.Add(this); } this.OnPropertyChanged("AddressType"); } } } [Association(Name="FK_CustomerAddress_Customer_CustomerID", Storage="_Customer", ThisKey="CustomerID", IsParent=true)] public Customer Customer { get { return this._Customer.Entity; } set { Customer v = this._Customer.Entity; if ((v != value)) { this.OnPropertyChanging("Customer"); if ((v != null)) { this._Customer.Entity = null; v.CustomerAddress.Remove(this); } this._Customer.Entity = value; if ((value != null)) { value.CustomerAddress.Add(this); } this.OnPropertyChanged("Customer"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SalesOrderHeaderSalesReason]")] public partial class SalesOrderHeaderSalesReason : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesOrderID; private int _SalesReasonID; private System.DateTime _ModifiedDate; private EntityRef _SalesOrderHeader; private EntityRef _SalesReason; public SalesOrderHeaderSalesReason() { this._SalesOrderHeader = default(EntityRef); this._SalesReason = default(EntityRef); } [Column(Storage="_SalesOrderID", DBType="Int NOT NULL", Id=true)] public int SalesOrderID { get { return this._SalesOrderID; } set { if ((this._SalesOrderID != value)) { this.OnPropertyChanging("SalesOrderID"); this._SalesOrderID = value; this.OnPropertyChanged("SalesOrderID"); } } } [Column(Storage="_SalesReasonID", DBType="Int NOT NULL", Id=true)] public int SalesReasonID { get { return this._SalesReasonID; } set { if ((this._SalesReasonID != value)) { this.OnPropertyChanging("SalesReasonID"); this._SalesReasonID = value; this.OnPropertyChanged("SalesReasonID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID", Storage="_SalesOrderHeader", ThisKey="SalesOrderID", IsParent=true)] public SalesOrderHeader SalesOrderHeader { get { return this._SalesOrderHeader.Entity; } set { SalesOrderHeader v = this._SalesOrderHeader.Entity; if ((v != value)) { this.OnPropertyChanging("SalesOrderHeader"); if ((v != null)) { this._SalesOrderHeader.Entity = null; v.SalesOrderHeaderSalesReason.Remove(this); } this._SalesOrderHeader.Entity = value; if ((value != null)) { value.SalesOrderHeaderSalesReason.Add(this); } this.OnPropertyChanged("SalesOrderHeader"); } } } [Association(Name="FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID", Storage="_SalesReason", ThisKey="SalesReasonID", IsParent=true)] public SalesReason SalesReason { get { return this._SalesReason.Entity; } set { SalesReason v = this._SalesReason.Entity; if ((v != value)) { this.OnPropertyChanging("SalesReason"); if ((v != null)) { this._SalesReason.Entity = null; v.SalesOrderHeaderSalesReason.Remove(this); } this._SalesReason.Entity = value; if ((value != null)) { value.SalesOrderHeaderSalesReason.Add(this); } this.OnPropertyChanged("SalesReason"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SalesPerson]")] public partial class SalesPerson : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesPersonID; private System.Nullable _TerritoryID; private System.Nullable _SalesQuota; private decimal _Bonus; private decimal _CommissionPct; private decimal _SalesYTD; private decimal _SalesLastYear; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _SalesOrderHeader; private EntityRef _Employee; private EntityRef _SalesTerritory; private EntitySet _SalesPersonQuotaHistory; private EntitySet _SalesTerritoryHistory; private EntitySet _Store; public SalesPerson() { this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); this._Employee = default(EntityRef); this._SalesTerritory = default(EntityRef); this._SalesPersonQuotaHistory = new EntitySet(new Notification(this.attach_SalesPersonQuotaHistory), new Notification(this.detach_SalesPersonQuotaHistory)); this._SalesTerritoryHistory = new EntitySet(new Notification(this.attach_SalesTerritoryHistory), new Notification(this.detach_SalesTerritoryHistory)); this._Store = new EntitySet(new Notification(this.attach_Store), new Notification(this.detach_Store)); } [Column(Storage="_SalesPersonID", DBType="Int NOT NULL", Id=true)] public int SalesPersonID { get { return this._SalesPersonID; } set { if ((this._SalesPersonID != value)) { this.OnPropertyChanging("SalesPersonID"); this._SalesPersonID = value; this.OnPropertyChanged("SalesPersonID"); } } } [Column(Storage="_TerritoryID", DBType="Int")] public System.Nullable TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Storage="_SalesQuota", DBType="Money")] public System.Nullable SalesQuota { get { return this._SalesQuota; } set { if ((this._SalesQuota != value)) { this.OnPropertyChanging("SalesQuota"); this._SalesQuota = value; this.OnPropertyChanged("SalesQuota"); } } } [Column(Storage="_Bonus", DBType="Money NOT NULL")] public decimal Bonus { get { return this._Bonus; } set { if ((this._Bonus != value)) { this.OnPropertyChanging("Bonus"); this._Bonus = value; this.OnPropertyChanged("Bonus"); } } } [Column(Storage="_CommissionPct", DBType="SmallMoney NOT NULL")] public decimal CommissionPct { get { return this._CommissionPct; } set { if ((this._CommissionPct != value)) { this.OnPropertyChanging("CommissionPct"); this._CommissionPct = value; this.OnPropertyChanged("CommissionPct"); } } } [Column(Storage="_SalesYTD", DBType="Money NOT NULL")] public decimal SalesYTD { get { return this._SalesYTD; } set { if ((this._SalesYTD != value)) { this.OnPropertyChanging("SalesYTD"); this._SalesYTD = value; this.OnPropertyChanged("SalesYTD"); } } } [Column(Storage="_SalesLastYear", DBType="Money NOT NULL")] public decimal SalesLastYear { get { return this._SalesLastYear; } set { if ((this._SalesLastYear != value)) { this.OnPropertyChanging("SalesLastYear"); this._SalesLastYear = value; this.OnPropertyChanged("SalesLastYear"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesOrderHeader_SalesPerson_SalesPersonID", Storage="_SalesOrderHeader", OtherKey="SalesPersonID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } [Association(Name="FK_SalesPerson_Employee_SalesPersonID", Storage="_Employee", ThisKey="SalesPersonID", Unique=true, IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.SalesPerson = null; } this._Employee.Entity = value; if ((value != null)) { value.SalesPerson = this; } this.OnPropertyChanged("Employee"); } } } [Association(Name="FK_SalesPerson_SalesTerritory_TerritoryID", Storage="_SalesTerritory", ThisKey="TerritoryID", IsParent=true)] public SalesTerritory SalesTerritory { get { return this._SalesTerritory.Entity; } set { SalesTerritory v = this._SalesTerritory.Entity; if ((v != value)) { this.OnPropertyChanging("SalesTerritory"); if ((v != null)) { this._SalesTerritory.Entity = null; v.SalesPerson.Remove(this); } this._SalesTerritory.Entity = value; if ((value != null)) { value.SalesPerson.Add(this); } this.OnPropertyChanged("SalesTerritory"); } } } [Association(Name="FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID", Storage="_SalesPersonQuotaHistory", OtherKey="SalesPersonID")] public EntitySet SalesPersonQuotaHistory { get { return this._SalesPersonQuotaHistory; } set { this._SalesPersonQuotaHistory.Assign(value); } } [Association(Name="FK_SalesTerritoryHistory_SalesPerson_SalesPersonID", Storage="_SalesTerritoryHistory", OtherKey="SalesPersonID")] public EntitySet SalesTerritoryHistory { get { return this._SalesTerritoryHistory; } set { this._SalesTerritoryHistory.Assign(value); } } [Association(Name="FK_Store_SalesPerson_SalesPersonID", Storage="_Store", OtherKey="SalesPersonID")] public EntitySet Store { get { return this._Store; } set { this._Store.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.SalesPerson = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.SalesPerson = null; this.OnPropertyChanged(null); } private void attach_SalesPersonQuotaHistory(SalesPersonQuotaHistory entity) { this.OnPropertyChanging(null); entity.SalesPerson = this; this.OnPropertyChanged(null); } private void detach_SalesPersonQuotaHistory(SalesPersonQuotaHistory entity) { this.OnPropertyChanging(null); entity.SalesPerson = null; this.OnPropertyChanged(null); } private void attach_SalesTerritoryHistory(SalesTerritoryHistory entity) { this.OnPropertyChanging(null); entity.SalesPerson = this; this.OnPropertyChanged(null); } private void detach_SalesTerritoryHistory(SalesTerritoryHistory entity) { this.OnPropertyChanging(null); entity.SalesPerson = null; this.OnPropertyChanged(null); } private void attach_Store(Store entity) { this.OnPropertyChanging(null); entity.SalesPerson = this; this.OnPropertyChanged(null); } private void detach_Store(Store entity) { this.OnPropertyChanging(null); entity.SalesPerson = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[SalesPersonQuotaHistory]")] public partial class SalesPersonQuotaHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesPersonID; private System.DateTime _QuotaDate; private decimal _SalesQuota; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _SalesPerson; public SalesPersonQuotaHistory() { this._SalesPerson = default(EntityRef); } [Column(Storage="_SalesPersonID", DBType="Int NOT NULL", Id=true)] public int SalesPersonID { get { return this._SalesPersonID; } set { if ((this._SalesPersonID != value)) { this.OnPropertyChanging("SalesPersonID"); this._SalesPersonID = value; this.OnPropertyChanged("SalesPersonID"); } } } [Column(Storage="_QuotaDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime QuotaDate { get { return this._QuotaDate; } set { if ((this._QuotaDate != value)) { this.OnPropertyChanging("QuotaDate"); this._QuotaDate = value; this.OnPropertyChanged("QuotaDate"); } } } [Column(Storage="_SalesQuota", DBType="Money NOT NULL")] public decimal SalesQuota { get { return this._SalesQuota; } set { if ((this._SalesQuota != value)) { this.OnPropertyChanging("SalesQuota"); this._SalesQuota = value; this.OnPropertyChanged("SalesQuota"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID", Storage="_SalesPerson", ThisKey="SalesPersonID", IsParent=true)] public SalesPerson SalesPerson { get { return this._SalesPerson.Entity; } set { SalesPerson v = this._SalesPerson.Entity; if ((v != value)) { this.OnPropertyChanging("SalesPerson"); if ((v != null)) { this._SalesPerson.Entity = null; v.SalesPersonQuotaHistory.Remove(this); } this._SalesPerson.Entity = value; if ((value != null)) { value.SalesPersonQuotaHistory.Add(this); } this.OnPropertyChanged("SalesPerson"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SalesReason]")] public partial class SalesReason : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesReasonID; private string _Name; private string _ReasonType; private System.DateTime _ModifiedDate; private EntitySet _SalesOrderHeaderSalesReason; public SalesReason() { this._SalesOrderHeaderSalesReason = new EntitySet(new Notification(this.attach_SalesOrderHeaderSalesReason), new Notification(this.detach_SalesOrderHeaderSalesReason)); } [Column(Storage="_SalesReasonID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int SalesReasonID { get { return this._SalesReasonID; } set { if ((this._SalesReasonID != value)) { this.OnPropertyChanging("SalesReasonID"); this._SalesReasonID = value; this.OnPropertyChanged("SalesReasonID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ReasonType", DBType="NVarChar(50) NOT NULL")] public string ReasonType { get { return this._ReasonType; } set { if ((this._ReasonType != value)) { this.OnPropertyChanging("ReasonType"); this._ReasonType = value; this.OnPropertyChanged("ReasonType"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID", Storage="_SalesOrderHeaderSalesReason", OtherKey="SalesReasonID")] public EntitySet SalesOrderHeaderSalesReason { get { return this._SalesOrderHeaderSalesReason; } set { this._SalesOrderHeaderSalesReason.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SalesOrderHeaderSalesReason(SalesOrderHeaderSalesReason entity) { this.OnPropertyChanging(null); entity.SalesReason = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeaderSalesReason(SalesOrderHeaderSalesReason entity) { this.OnPropertyChanging(null); entity.SalesReason = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[Individual]")] public partial class Individual : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CustomerID; private int _ContactID; private string _Demographics; private System.DateTime _ModifiedDate; private EntityRef _Contact; private EntityRef _Customer; public Individual() { this._Contact = default(EntityRef); this._Customer = default(EntityRef); } [Column(Storage="_CustomerID", DBType="Int NOT NULL", Id=true)] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_ContactID", DBType="Int NOT NULL")] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_Demographics", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string Demographics { get { return this._Demographics; } set { if ((this._Demographics != value)) { this.OnPropertyChanging("Demographics"); this._Demographics = value; this.OnPropertyChanged("Demographics"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Individual_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.Individual.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.Individual.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_Individual_Customer_CustomerID", Storage="_Customer", ThisKey="CustomerID", Unique=true, IsParent=true)] public Customer Customer { get { return this._Customer.Entity; } set { Customer v = this._Customer.Entity; if ((v != value)) { this.OnPropertyChanging("Customer"); if ((v != null)) { this._Customer.Entity = null; v.Individual = null; } this._Customer.Entity = value; if ((value != null)) { value.Individual = this; } this.OnPropertyChanged("Customer"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SalesTaxRate]")] public partial class SalesTaxRate : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesTaxRateID; private int _StateProvinceID; private byte _TaxType; private decimal _TaxRate; private string _Name; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _StateProvince; public SalesTaxRate() { this._StateProvince = default(EntityRef); } [Column(Storage="_SalesTaxRateID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int SalesTaxRateID { get { return this._SalesTaxRateID; } set { if ((this._SalesTaxRateID != value)) { this.OnPropertyChanging("SalesTaxRateID"); this._SalesTaxRateID = value; this.OnPropertyChanged("SalesTaxRateID"); } } } [Column(Storage="_StateProvinceID", DBType="Int NOT NULL")] public int StateProvinceID { get { return this._StateProvinceID; } set { if ((this._StateProvinceID != value)) { this.OnPropertyChanging("StateProvinceID"); this._StateProvinceID = value; this.OnPropertyChanged("StateProvinceID"); } } } [Column(Storage="_TaxType", DBType="TinyInt NOT NULL")] public byte TaxType { get { return this._TaxType; } set { if ((this._TaxType != value)) { this.OnPropertyChanging("TaxType"); this._TaxType = value; this.OnPropertyChanged("TaxType"); } } } [Column(Storage="_TaxRate", DBType="SmallMoney NOT NULL")] public decimal TaxRate { get { return this._TaxRate; } set { if ((this._TaxRate != value)) { this.OnPropertyChanging("TaxRate"); this._TaxRate = value; this.OnPropertyChanged("TaxRate"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesTaxRate_StateProvince_StateProvinceID", Storage="_StateProvince", ThisKey="StateProvinceID", IsParent=true)] public StateProvince StateProvince { get { return this._StateProvince.Entity; } set { StateProvince v = this._StateProvince.Entity; if ((v != value)) { this.OnPropertyChanging("StateProvince"); if ((v != null)) { this._StateProvince.Entity = null; v.SalesTaxRate.Remove(this); } this._StateProvince.Entity = value; if ((value != null)) { value.SalesTaxRate.Add(this); } this.OnPropertyChanged("StateProvince"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SalesTerritory]")] public partial class SalesTerritory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _TerritoryID; private string _Name; private string _CountryRegionCode; private string _Group; private decimal _SalesYTD; private decimal _SalesLastYear; private decimal _CostYTD; private decimal _CostLastYear; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _StateProvince; private EntitySet _Customer; private EntitySet _SalesOrderHeader; private EntitySet _SalesPerson; private EntitySet _SalesTerritoryHistory; public SalesTerritory() { this._StateProvince = new EntitySet(new Notification(this.attach_StateProvince), new Notification(this.detach_StateProvince)); this._Customer = new EntitySet(new Notification(this.attach_Customer), new Notification(this.detach_Customer)); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); this._SalesPerson = new EntitySet(new Notification(this.attach_SalesPerson), new Notification(this.detach_SalesPerson)); this._SalesTerritoryHistory = new EntitySet(new Notification(this.attach_SalesTerritoryHistory), new Notification(this.detach_SalesTerritoryHistory)); } [Column(Storage="_TerritoryID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_CountryRegionCode", DBType="NVarChar(3) NOT NULL")] public string CountryRegionCode { get { return this._CountryRegionCode; } set { if ((this._CountryRegionCode != value)) { this.OnPropertyChanging("CountryRegionCode"); this._CountryRegionCode = value; this.OnPropertyChanged("CountryRegionCode"); } } } [Column(Storage="_Group", DBType="NVarChar(50) NOT NULL")] public string Group { get { return this._Group; } set { if ((this._Group != value)) { this.OnPropertyChanging("Group"); this._Group = value; this.OnPropertyChanged("Group"); } } } [Column(Storage="_SalesYTD", DBType="Money NOT NULL")] public decimal SalesYTD { get { return this._SalesYTD; } set { if ((this._SalesYTD != value)) { this.OnPropertyChanging("SalesYTD"); this._SalesYTD = value; this.OnPropertyChanged("SalesYTD"); } } } [Column(Storage="_SalesLastYear", DBType="Money NOT NULL")] public decimal SalesLastYear { get { return this._SalesLastYear; } set { if ((this._SalesLastYear != value)) { this.OnPropertyChanging("SalesLastYear"); this._SalesLastYear = value; this.OnPropertyChanged("SalesLastYear"); } } } [Column(Storage="_CostYTD", DBType="Money NOT NULL")] public decimal CostYTD { get { return this._CostYTD; } set { if ((this._CostYTD != value)) { this.OnPropertyChanging("CostYTD"); this._CostYTD = value; this.OnPropertyChanged("CostYTD"); } } } [Column(Storage="_CostLastYear", DBType="Money NOT NULL")] public decimal CostLastYear { get { return this._CostLastYear; } set { if ((this._CostLastYear != value)) { this.OnPropertyChanging("CostLastYear"); this._CostLastYear = value; this.OnPropertyChanged("CostLastYear"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_StateProvince_SalesTerritory_TerritoryID", Storage="_StateProvince", OtherKey="TerritoryID")] public EntitySet StateProvince { get { return this._StateProvince; } set { this._StateProvince.Assign(value); } } [Association(Name="FK_Customer_SalesTerritory_TerritoryID", Storage="_Customer", OtherKey="TerritoryID")] public EntitySet Customer { get { return this._Customer; } set { this._Customer.Assign(value); } } [Association(Name="FK_SalesOrderHeader_SalesTerritory_TerritoryID", Storage="_SalesOrderHeader", OtherKey="TerritoryID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } [Association(Name="FK_SalesPerson_SalesTerritory_TerritoryID", Storage="_SalesPerson", OtherKey="TerritoryID")] public EntitySet SalesPerson { get { return this._SalesPerson; } set { this._SalesPerson.Assign(value); } } [Association(Name="FK_SalesTerritoryHistory_SalesTerritory_TerritoryID", Storage="_SalesTerritoryHistory", OtherKey="TerritoryID")] public EntitySet SalesTerritoryHistory { get { return this._SalesTerritoryHistory; } set { this._SalesTerritoryHistory.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_StateProvince(StateProvince entity) { this.OnPropertyChanging(null); entity.SalesTerritory = this; this.OnPropertyChanged(null); } private void detach_StateProvince(StateProvince entity) { this.OnPropertyChanging(null); entity.SalesTerritory = null; this.OnPropertyChanged(null); } private void attach_Customer(Customer entity) { this.OnPropertyChanging(null); entity.SalesTerritory = this; this.OnPropertyChanged(null); } private void detach_Customer(Customer entity) { this.OnPropertyChanging(null); entity.SalesTerritory = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.SalesTerritory = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.SalesTerritory = null; this.OnPropertyChanged(null); } private void attach_SalesPerson(SalesPerson entity) { this.OnPropertyChanging(null); entity.SalesTerritory = this; this.OnPropertyChanged(null); } private void detach_SalesPerson(SalesPerson entity) { this.OnPropertyChanging(null); entity.SalesTerritory = null; this.OnPropertyChanged(null); } private void attach_SalesTerritoryHistory(SalesTerritoryHistory entity) { this.OnPropertyChanging(null); entity.SalesTerritory = this; this.OnPropertyChanged(null); } private void detach_SalesTerritoryHistory(SalesTerritoryHistory entity) { this.OnPropertyChanging(null); entity.SalesTerritory = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[SalesTerritoryHistory]")] public partial class SalesTerritoryHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SalesPersonID; private int _TerritoryID; private System.DateTime _StartDate; private System.Nullable _EndDate; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _SalesPerson; private EntityRef _SalesTerritory; public SalesTerritoryHistory() { this._SalesPerson = default(EntityRef); this._SalesTerritory = default(EntityRef); } [Column(Storage="_SalesPersonID", DBType="Int NOT NULL", Id=true)] public int SalesPersonID { get { return this._SalesPersonID; } set { if ((this._SalesPersonID != value)) { this.OnPropertyChanging("SalesPersonID"); this._SalesPersonID = value; this.OnPropertyChanged("SalesPersonID"); } } } [Column(Storage="_TerritoryID", DBType="Int NOT NULL", Id=true)] public int TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesTerritoryHistory_SalesPerson_SalesPersonID", Storage="_SalesPerson", ThisKey="SalesPersonID", IsParent=true)] public SalesPerson SalesPerson { get { return this._SalesPerson.Entity; } set { SalesPerson v = this._SalesPerson.Entity; if ((v != value)) { this.OnPropertyChanging("SalesPerson"); if ((v != null)) { this._SalesPerson.Entity = null; v.SalesTerritoryHistory.Remove(this); } this._SalesPerson.Entity = value; if ((value != null)) { value.SalesTerritoryHistory.Add(this); } this.OnPropertyChanged("SalesPerson"); } } } [Association(Name="FK_SalesTerritoryHistory_SalesTerritory_TerritoryID", Storage="_SalesTerritory", ThisKey="TerritoryID", IsParent=true)] public SalesTerritory SalesTerritory { get { return this._SalesTerritory.Entity; } set { SalesTerritory v = this._SalesTerritory.Entity; if ((v != value)) { this.OnPropertyChanging("SalesTerritory"); if ((v != null)) { this._SalesTerritory.Entity = null; v.SalesTerritoryHistory.Remove(this); } this._SalesTerritory.Entity = value; if ((value != null)) { value.SalesTerritoryHistory.Add(this); } this.OnPropertyChanged("SalesTerritory"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[ShoppingCartItem]")] public partial class ShoppingCartItem : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ShoppingCartItemID; private string _ShoppingCartID; private int _Quantity; private int _ProductID; private System.DateTime _DateCreated; private System.DateTime _ModifiedDate; private EntityRef _Product; public ShoppingCartItem() { this._Product = default(EntityRef); } [Column(Storage="_ShoppingCartItemID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ShoppingCartItemID { get { return this._ShoppingCartItemID; } set { if ((this._ShoppingCartItemID != value)) { this.OnPropertyChanging("ShoppingCartItemID"); this._ShoppingCartItemID = value; this.OnPropertyChanged("ShoppingCartItemID"); } } } [Column(Storage="_ShoppingCartID", DBType="NVarChar(50) NOT NULL")] public string ShoppingCartID { get { return this._ShoppingCartID; } set { if ((this._ShoppingCartID != value)) { this.OnPropertyChanging("ShoppingCartID"); this._ShoppingCartID = value; this.OnPropertyChanged("ShoppingCartID"); } } } [Column(Storage="_Quantity", DBType="Int NOT NULL")] public int Quantity { get { return this._Quantity; } set { if ((this._Quantity != value)) { this.OnPropertyChanging("Quantity"); this._Quantity = value; this.OnPropertyChanged("Quantity"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_DateCreated", DBType="DateTime NOT NULL")] public System.DateTime DateCreated { get { return this._DateCreated; } set { if ((this._DateCreated != value)) { this.OnPropertyChanging("DateCreated"); this._DateCreated = value; this.OnPropertyChanged("DateCreated"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ShoppingCartItem_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ShoppingCartItem.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ShoppingCartItem.Add(this); } this.OnPropertyChanged("Product"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Sales].[SpecialOffer]")] public partial class SpecialOffer : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SpecialOfferID; private string _Description; private decimal _DiscountPct; private string _Type; private string _Category; private System.DateTime _StartDate; private System.DateTime _EndDate; private int _MinQty; private System.Nullable _MaxQty; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _SpecialOfferProduct; public SpecialOffer() { this._SpecialOfferProduct = new EntitySet(new Notification(this.attach_SpecialOfferProduct), new Notification(this.detach_SpecialOfferProduct)); } [Column(Storage="_SpecialOfferID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int SpecialOfferID { get { return this._SpecialOfferID; } set { if ((this._SpecialOfferID != value)) { this.OnPropertyChanging("SpecialOfferID"); this._SpecialOfferID = value; this.OnPropertyChanged("SpecialOfferID"); } } } [Column(Storage="_Description", DBType="NVarChar(255) NOT NULL")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnPropertyChanging("Description"); this._Description = value; this.OnPropertyChanged("Description"); } } } [Column(Storage="_DiscountPct", DBType="SmallMoney NOT NULL")] public decimal DiscountPct { get { return this._DiscountPct; } set { if ((this._DiscountPct != value)) { this.OnPropertyChanging("DiscountPct"); this._DiscountPct = value; this.OnPropertyChanged("DiscountPct"); } } } [Column(Storage="_Type", DBType="NVarChar(50) NOT NULL")] public string Type { get { return this._Type; } set { if ((this._Type != value)) { this.OnPropertyChanging("Type"); this._Type = value; this.OnPropertyChanged("Type"); } } } [Column(Storage="_Category", DBType="NVarChar(50) NOT NULL")] public string Category { get { return this._Category; } set { if ((this._Category != value)) { this.OnPropertyChanging("Category"); this._Category = value; this.OnPropertyChanged("Category"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL")] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime NOT NULL")] public System.DateTime EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_MinQty", DBType="Int NOT NULL")] public int MinQty { get { return this._MinQty; } set { if ((this._MinQty != value)) { this.OnPropertyChanging("MinQty"); this._MinQty = value; this.OnPropertyChanged("MinQty"); } } } [Column(Storage="_MaxQty", DBType="Int")] public System.Nullable MaxQty { get { return this._MaxQty; } set { if ((this._MaxQty != value)) { this.OnPropertyChanging("MaxQty"); this._MaxQty = value; this.OnPropertyChanged("MaxQty"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID", Storage="_SpecialOfferProduct", OtherKey="SpecialOfferID")] public EntitySet SpecialOfferProduct { get { return this._SpecialOfferProduct; } set { this._SpecialOfferProduct.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SpecialOfferProduct(SpecialOfferProduct entity) { this.OnPropertyChanging(null); entity.SpecialOffer = this; this.OnPropertyChanged(null); } private void detach_SpecialOfferProduct(SpecialOfferProduct entity) { this.OnPropertyChanging(null); entity.SpecialOffer = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[SpecialOfferProduct]")] public partial class SpecialOfferProduct : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _SpecialOfferID; private int _ProductID; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _SalesOrderDetail; private EntityRef _Product; private EntityRef _SpecialOffer; public SpecialOfferProduct() { this._SalesOrderDetail = new EntitySet(new Notification(this.attach_SalesOrderDetail), new Notification(this.detach_SalesOrderDetail)); this._Product = default(EntityRef); this._SpecialOffer = default(EntityRef); } [Column(Storage="_SpecialOfferID", DBType="Int NOT NULL", Id=true)] public int SpecialOfferID { get { return this._SpecialOfferID; } set { if ((this._SpecialOfferID != value)) { this.OnPropertyChanging("SpecialOfferID"); this._SpecialOfferID = value; this.OnPropertyChanged("SpecialOfferID"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID", Storage="_SalesOrderDetail", OtherKey="SpecialOfferID, ProductID")] public EntitySet SalesOrderDetail { get { return this._SalesOrderDetail; } set { this._SalesOrderDetail.Assign(value); } } [Association(Name="FK_SpecialOfferProduct_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.SpecialOfferProduct.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.SpecialOfferProduct.Add(this); } this.OnPropertyChanged("Product"); } } } [Association(Name="FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID", Storage="_SpecialOffer", ThisKey="SpecialOfferID", IsParent=true)] public SpecialOffer SpecialOffer { get { return this._SpecialOffer.Entity; } set { SpecialOffer v = this._SpecialOffer.Entity; if ((v != value)) { this.OnPropertyChanging("SpecialOffer"); if ((v != null)) { this._SpecialOffer.Entity = null; v.SpecialOfferProduct.Remove(this); } this._SpecialOffer.Entity = value; if ((value != null)) { value.SpecialOfferProduct.Add(this); } this.OnPropertyChanged("SpecialOffer"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_SalesOrderDetail(SalesOrderDetail entity) { this.OnPropertyChanging(null); entity.SpecialOfferProduct = this; this.OnPropertyChanged(null); } private void detach_SalesOrderDetail(SalesOrderDetail entity) { this.OnPropertyChanging(null); entity.SpecialOfferProduct = null; this.OnPropertyChanged(null); } } [Table(Name="[Sales].[Store]")] public partial class Store : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _CustomerID; private string _Name; private System.Nullable _SalesPersonID; private string _Demographics; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _Customer; private EntityRef _SalesPerson; private EntitySet _StoreContact; public Store() { this._Customer = default(EntityRef); this._SalesPerson = default(EntityRef); this._StoreContact = new EntitySet(new Notification(this.attach_StoreContact), new Notification(this.detach_StoreContact)); } [Column(Storage="_CustomerID", DBType="Int NOT NULL", Id=true)] public int CustomerID { get { return this._CustomerID; } set { if ((this._CustomerID != value)) { this.OnPropertyChanging("CustomerID"); this._CustomerID = value; this.OnPropertyChanged("CustomerID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_SalesPersonID", DBType="Int")] public System.Nullable SalesPersonID { get { return this._SalesPersonID; } set { if ((this._SalesPersonID != value)) { this.OnPropertyChanging("SalesPersonID"); this._SalesPersonID = value; this.OnPropertyChanged("SalesPersonID"); } } } [Column(Storage="_Demographics", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string Demographics { get { return this._Demographics; } set { if ((this._Demographics != value)) { this.OnPropertyChanging("Demographics"); this._Demographics = value; this.OnPropertyChanged("Demographics"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Store_Customer_CustomerID", Storage="_Customer", ThisKey="CustomerID", Unique=true, IsParent=true)] public Customer Customer { get { return this._Customer.Entity; } set { Customer v = this._Customer.Entity; if ((v != value)) { this.OnPropertyChanging("Customer"); if ((v != null)) { this._Customer.Entity = null; v.Store = null; } this._Customer.Entity = value; if ((value != null)) { value.Store = this; } this.OnPropertyChanged("Customer"); } } } [Association(Name="FK_Store_SalesPerson_SalesPersonID", Storage="_SalesPerson", ThisKey="SalesPersonID", IsParent=true)] public SalesPerson SalesPerson { get { return this._SalesPerson.Entity; } set { SalesPerson v = this._SalesPerson.Entity; if ((v != value)) { this.OnPropertyChanging("SalesPerson"); if ((v != null)) { this._SalesPerson.Entity = null; v.Store.Remove(this); } this._SalesPerson.Entity = value; if ((value != null)) { value.Store.Add(this); } this.OnPropertyChanged("SalesPerson"); } } } [Association(Name="FK_StoreContact_Store_CustomerID", Storage="_StoreContact", OtherKey="CustomerID")] public EntitySet StoreContact { get { return this._StoreContact; } set { this._StoreContact.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.Store = this; this.OnPropertyChanged(null); } private void detach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.Store = null; this.OnPropertyChanged(null); } } public partial class Person : Schema { public Table
Address; public Table AddressType; public Table Contact; public Table ContactType; public Table CountryRegion; public Table StateProvince; public Person(DataContext context) : base(context) { } } [Table(Name="[Person].[Address]")] public partial class Address : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _AddressID; private string _AddressLine1; private string _AddressLine2; private string _City; private int _StateProvinceID; private string _PostalCode; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _EmployeeAddress; private EntityRef _StateProvince; private EntitySet _VendorAddress; private EntitySet _CustomerAddress; private EntitySet _SalesOrderHeaderAddressBillToAddressID; private EntitySet _SalesOrderHeaderAddressShipToAddressID; public Address() { this._EmployeeAddress = new EntitySet(new Notification(this.attach_EmployeeAddress), new Notification(this.detach_EmployeeAddress)); this._StateProvince = default(EntityRef); this._VendorAddress = new EntitySet(new Notification(this.attach_VendorAddress), new Notification(this.detach_VendorAddress)); this._CustomerAddress = new EntitySet(new Notification(this.attach_CustomerAddress), new Notification(this.detach_CustomerAddress)); this._SalesOrderHeaderAddressBillToAddressID = new EntitySet(new Notification(this.attach_SalesOrderHeaderAddressBillToAddressID), new Notification(this.detach_SalesOrderHeaderAddressBillToAddressID)); this._SalesOrderHeaderAddressShipToAddressID = new EntitySet(new Notification(this.attach_SalesOrderHeaderAddressShipToAddressID), new Notification(this.detach_SalesOrderHeaderAddressShipToAddressID)); } [Column(Storage="_AddressID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int AddressID { get { return this._AddressID; } set { if ((this._AddressID != value)) { this.OnPropertyChanging("AddressID"); this._AddressID = value; this.OnPropertyChanged("AddressID"); } } } [Column(Storage="_AddressLine1", DBType="NVarChar(60) NOT NULL")] public string AddressLine1 { get { return this._AddressLine1; } set { if ((this._AddressLine1 != value)) { this.OnPropertyChanging("AddressLine1"); this._AddressLine1 = value; this.OnPropertyChanged("AddressLine1"); } } } [Column(Storage="_AddressLine2", DBType="NVarChar(60)")] public string AddressLine2 { get { return this._AddressLine2; } set { if ((this._AddressLine2 != value)) { this.OnPropertyChanging("AddressLine2"); this._AddressLine2 = value; this.OnPropertyChanged("AddressLine2"); } } } [Column(Storage="_City", DBType="NVarChar(30) NOT NULL")] public string City { get { return this._City; } set { if ((this._City != value)) { this.OnPropertyChanging("City"); this._City = value; this.OnPropertyChanged("City"); } } } [Column(Storage="_StateProvinceID", DBType="Int NOT NULL")] public int StateProvinceID { get { return this._StateProvinceID; } set { if ((this._StateProvinceID != value)) { this.OnPropertyChanging("StateProvinceID"); this._StateProvinceID = value; this.OnPropertyChanged("StateProvinceID"); } } } [Column(Storage="_PostalCode", DBType="NVarChar(15) NOT NULL")] public string PostalCode { get { return this._PostalCode; } set { if ((this._PostalCode != value)) { this.OnPropertyChanging("PostalCode"); this._PostalCode = value; this.OnPropertyChanged("PostalCode"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeeAddress_Address_AddressID", Storage="_EmployeeAddress", OtherKey="AddressID")] public EntitySet EmployeeAddress { get { return this._EmployeeAddress; } set { this._EmployeeAddress.Assign(value); } } [Association(Name="FK_Address_StateProvince_StateProvinceID", Storage="_StateProvince", ThisKey="StateProvinceID", IsParent=true)] public StateProvince StateProvince { get { return this._StateProvince.Entity; } set { StateProvince v = this._StateProvince.Entity; if ((v != value)) { this.OnPropertyChanging("StateProvince"); if ((v != null)) { this._StateProvince.Entity = null; v.Address.Remove(this); } this._StateProvince.Entity = value; if ((value != null)) { value.Address.Add(this); } this.OnPropertyChanged("StateProvince"); } } } [Association(Name="FK_VendorAddress_Address_AddressID", Storage="_VendorAddress", OtherKey="AddressID")] public EntitySet VendorAddress { get { return this._VendorAddress; } set { this._VendorAddress.Assign(value); } } [Association(Name="FK_CustomerAddress_Address_AddressID", Storage="_CustomerAddress", OtherKey="AddressID")] public EntitySet CustomerAddress { get { return this._CustomerAddress; } set { this._CustomerAddress.Assign(value); } } [Association(Name="FK_SalesOrderHeader_Address_BillToAddressID", Storage="_SalesOrderHeaderAddressBillToAddressID", OtherKey="BillToAddressID")] public EntitySet SalesOrderHeaderAddressBillToAddressID { get { return this._SalesOrderHeaderAddressBillToAddressID; } set { this._SalesOrderHeaderAddressBillToAddressID.Assign(value); } } [Association(Name="FK_SalesOrderHeader_Address_ShipToAddressID", Storage="_SalesOrderHeaderAddressShipToAddressID", OtherKey="ShipToAddressID")] public EntitySet SalesOrderHeaderAddressShipToAddressID { get { return this._SalesOrderHeaderAddressShipToAddressID; } set { this._SalesOrderHeaderAddressShipToAddressID.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_EmployeeAddress(EmployeeAddress entity) { this.OnPropertyChanging(null); entity.Address = this; this.OnPropertyChanged(null); } private void detach_EmployeeAddress(EmployeeAddress entity) { this.OnPropertyChanging(null); entity.Address = null; this.OnPropertyChanged(null); } private void attach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.Address = this; this.OnPropertyChanged(null); } private void detach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.Address = null; this.OnPropertyChanged(null); } private void attach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.Address = this; this.OnPropertyChanged(null); } private void detach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.Address = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeaderAddressBillToAddressID(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.BillToAddress = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeaderAddressBillToAddressID(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.BillToAddress = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeaderAddressShipToAddressID(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipToAddress = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeaderAddressShipToAddressID(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipToAddress = null; this.OnPropertyChanged(null); } } [Table(Name="[Person].[AddressType]")] public partial class AddressType : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _AddressTypeID; private string _Name; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _VendorAddress; private EntitySet _CustomerAddress; public AddressType() { this._VendorAddress = new EntitySet(new Notification(this.attach_VendorAddress), new Notification(this.detach_VendorAddress)); this._CustomerAddress = new EntitySet(new Notification(this.attach_CustomerAddress), new Notification(this.detach_CustomerAddress)); } [Column(Storage="_AddressTypeID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int AddressTypeID { get { return this._AddressTypeID; } set { if ((this._AddressTypeID != value)) { this.OnPropertyChanging("AddressTypeID"); this._AddressTypeID = value; this.OnPropertyChanged("AddressTypeID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_VendorAddress_AddressType_AddressTypeID", Storage="_VendorAddress", OtherKey="AddressTypeID")] public EntitySet VendorAddress { get { return this._VendorAddress; } set { this._VendorAddress.Assign(value); } } [Association(Name="FK_CustomerAddress_AddressType_AddressTypeID", Storage="_CustomerAddress", OtherKey="AddressTypeID")] public EntitySet CustomerAddress { get { return this._CustomerAddress; } set { this._CustomerAddress.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.AddressType = this; this.OnPropertyChanged(null); } private void detach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.AddressType = null; this.OnPropertyChanged(null); } private void attach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.AddressType = this; this.OnPropertyChanged(null); } private void detach_CustomerAddress(CustomerAddress entity) { this.OnPropertyChanging(null); entity.AddressType = null; this.OnPropertyChanged(null); } } [Table(Name="[Person].[Contact]")] public partial class Contact : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ContactID; private bool _NameStyle; private string _Title; private string _FirstName; private string _MiddleName; private string _LastName; private string _Suffix; private string _EmailAddress; private int _EmailPromotion; private string _Phone; private string _PasswordHash; private string _PasswordSalt; private string _AdditionalContactInfo; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _Employee; private EntitySet _VendorContact; private EntitySet _ContactCreditCard; private EntitySet _Individual; private EntitySet _SalesOrderHeader; private EntitySet _StoreContact; public Contact() { this._Employee = new EntitySet(new Notification(this.attach_Employee), new Notification(this.detach_Employee)); this._VendorContact = new EntitySet(new Notification(this.attach_VendorContact), new Notification(this.detach_VendorContact)); this._ContactCreditCard = new EntitySet(new Notification(this.attach_ContactCreditCard), new Notification(this.detach_ContactCreditCard)); this._Individual = new EntitySet(new Notification(this.attach_Individual), new Notification(this.detach_Individual)); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); this._StoreContact = new EntitySet(new Notification(this.attach_StoreContact), new Notification(this.detach_StoreContact)); } [Column(Storage="_ContactID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_NameStyle", DBType="Bit NOT NULL")] public bool NameStyle { get { return this._NameStyle; } set { if ((this._NameStyle != value)) { this.OnPropertyChanging("NameStyle"); this._NameStyle = value; this.OnPropertyChanged("NameStyle"); } } } [Column(Storage="_Title", DBType="NVarChar(8)")] public string Title { get { return this._Title; } set { if ((this._Title != value)) { this.OnPropertyChanging("Title"); this._Title = value; this.OnPropertyChanged("Title"); } } } [Column(Storage="_FirstName", DBType="NVarChar(50) NOT NULL")] public string FirstName { get { return this._FirstName; } set { if ((this._FirstName != value)) { this.OnPropertyChanging("FirstName"); this._FirstName = value; this.OnPropertyChanged("FirstName"); } } } [Column(Storage="_MiddleName", DBType="NVarChar(50)")] public string MiddleName { get { return this._MiddleName; } set { if ((this._MiddleName != value)) { this.OnPropertyChanging("MiddleName"); this._MiddleName = value; this.OnPropertyChanged("MiddleName"); } } } [Column(Storage="_LastName", DBType="NVarChar(50) NOT NULL")] public string LastName { get { return this._LastName; } set { if ((this._LastName != value)) { this.OnPropertyChanging("LastName"); this._LastName = value; this.OnPropertyChanged("LastName"); } } } [Column(Storage="_Suffix", DBType="NVarChar(10)")] public string Suffix { get { return this._Suffix; } set { if ((this._Suffix != value)) { this.OnPropertyChanging("Suffix"); this._Suffix = value; this.OnPropertyChanged("Suffix"); } } } [Column(Storage="_EmailAddress", DBType="NVarChar(50)")] public string EmailAddress { get { return this._EmailAddress; } set { if ((this._EmailAddress != value)) { this.OnPropertyChanging("EmailAddress"); this._EmailAddress = value; this.OnPropertyChanged("EmailAddress"); } } } [Column(Storage="_EmailPromotion", DBType="Int NOT NULL")] public int EmailPromotion { get { return this._EmailPromotion; } set { if ((this._EmailPromotion != value)) { this.OnPropertyChanging("EmailPromotion"); this._EmailPromotion = value; this.OnPropertyChanged("EmailPromotion"); } } } [Column(Storage="_Phone", DBType="NVarChar(25)")] public string Phone { get { return this._Phone; } set { if ((this._Phone != value)) { this.OnPropertyChanging("Phone"); this._Phone = value; this.OnPropertyChanged("Phone"); } } } [Column(Storage="_PasswordHash", DBType="VarChar(40) NOT NULL")] public string PasswordHash { get { return this._PasswordHash; } set { if ((this._PasswordHash != value)) { this.OnPropertyChanging("PasswordHash"); this._PasswordHash = value; this.OnPropertyChanged("PasswordHash"); } } } [Column(Storage="_PasswordSalt", DBType="VarChar(10) NOT NULL")] public string PasswordSalt { get { return this._PasswordSalt; } set { if ((this._PasswordSalt != value)) { this.OnPropertyChanging("PasswordSalt"); this._PasswordSalt = value; this.OnPropertyChanged("PasswordSalt"); } } } [Column(Storage="_AdditionalContactInfo", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string AdditionalContactInfo { get { return this._AdditionalContactInfo; } set { if ((this._AdditionalContactInfo != value)) { this.OnPropertyChanging("AdditionalContactInfo"); this._AdditionalContactInfo = value; this.OnPropertyChanged("AdditionalContactInfo"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Employee_Contact_ContactID", Storage="_Employee", OtherKey="ContactID")] public EntitySet Employee { get { return this._Employee; } set { this._Employee.Assign(value); } } [Association(Name="FK_VendorContact_Contact_ContactID", Storage="_VendorContact", OtherKey="ContactID")] public EntitySet VendorContact { get { return this._VendorContact; } set { this._VendorContact.Assign(value); } } [Association(Name="FK_ContactCreditCard_Contact_ContactID", Storage="_ContactCreditCard", OtherKey="ContactID")] public EntitySet ContactCreditCard { get { return this._ContactCreditCard; } set { this._ContactCreditCard.Assign(value); } } [Association(Name="FK_Individual_Contact_ContactID", Storage="_Individual", OtherKey="ContactID")] public EntitySet Individual { get { return this._Individual; } set { this._Individual.Assign(value); } } [Association(Name="FK_SalesOrderHeader_Contact_ContactID", Storage="_SalesOrderHeader", OtherKey="ContactID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } [Association(Name="FK_StoreContact_Contact_ContactID", Storage="_StoreContact", OtherKey="ContactID")] public EntitySet StoreContact { get { return this._StoreContact; } set { this._StoreContact.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_Employee(Employee entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_Employee(Employee entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } private void attach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } private void attach_ContactCreditCard(ContactCreditCard entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_ContactCreditCard(ContactCreditCard entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } private void attach_Individual(Individual entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_Individual(Individual entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } private void attach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.Contact = this; this.OnPropertyChanged(null); } private void detach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.Contact = null; this.OnPropertyChanged(null); } } [Table(Name="[Person].[ContactType]")] public partial class ContactType : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ContactTypeID; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _VendorContact; private EntitySet _StoreContact; public ContactType() { this._VendorContact = new EntitySet(new Notification(this.attach_VendorContact), new Notification(this.detach_VendorContact)); this._StoreContact = new EntitySet(new Notification(this.attach_StoreContact), new Notification(this.detach_StoreContact)); } [Column(Storage="_ContactTypeID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ContactTypeID { get { return this._ContactTypeID; } set { if ((this._ContactTypeID != value)) { this.OnPropertyChanging("ContactTypeID"); this._ContactTypeID = value; this.OnPropertyChanged("ContactTypeID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_VendorContact_ContactType_ContactTypeID", Storage="_VendorContact", OtherKey="ContactTypeID")] public EntitySet VendorContact { get { return this._VendorContact; } set { this._VendorContact.Assign(value); } } [Association(Name="FK_StoreContact_ContactType_ContactTypeID", Storage="_StoreContact", OtherKey="ContactTypeID")] public EntitySet StoreContact { get { return this._StoreContact; } set { this._StoreContact.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.ContactType = this; this.OnPropertyChanged(null); } private void detach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.ContactType = null; this.OnPropertyChanged(null); } private void attach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.ContactType = this; this.OnPropertyChanged(null); } private void detach_StoreContact(StoreContact entity) { this.OnPropertyChanging(null); entity.ContactType = null; this.OnPropertyChanged(null); } } [Table(Name="[Person].[CountryRegion]")] public partial class CountryRegion : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private string _CountryRegionCode; private string _Name; private System.DateTime _ModifiedDate; private EntitySet _StateProvince; private EntitySet _CountryRegionCurrency; public CountryRegion() { this._StateProvince = new EntitySet(new Notification(this.attach_StateProvince), new Notification(this.detach_StateProvince)); this._CountryRegionCurrency = new EntitySet(new Notification(this.attach_CountryRegionCurrency), new Notification(this.detach_CountryRegionCurrency)); } [Column(Storage="_CountryRegionCode", DBType="NVarChar(3) NOT NULL", Id=true)] public string CountryRegionCode { get { return this._CountryRegionCode; } set { if ((this._CountryRegionCode != value)) { this.OnPropertyChanging("CountryRegionCode"); this._CountryRegionCode = value; this.OnPropertyChanged("CountryRegionCode"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_StateProvince_CountryRegion_CountryRegionCode", Storage="_StateProvince", OtherKey="CountryRegionCode")] public EntitySet StateProvince { get { return this._StateProvince; } set { this._StateProvince.Assign(value); } } [Association(Name="FK_CountryRegionCurrency_CountryRegion_CountryRegionCode", Storage="_CountryRegionCurrency", OtherKey="CountryRegionCode")] public EntitySet CountryRegionCurrency { get { return this._CountryRegionCurrency; } set { this._CountryRegionCurrency.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_StateProvince(StateProvince entity) { this.OnPropertyChanging(null); entity.CountryRegion = this; this.OnPropertyChanged(null); } private void detach_StateProvince(StateProvince entity) { this.OnPropertyChanging(null); entity.CountryRegion = null; this.OnPropertyChanged(null); } private void attach_CountryRegionCurrency(CountryRegionCurrency entity) { this.OnPropertyChanging(null); entity.CountryRegion = this; this.OnPropertyChanged(null); } private void detach_CountryRegionCurrency(CountryRegionCurrency entity) { this.OnPropertyChanging(null); entity.CountryRegion = null; this.OnPropertyChanged(null); } } [Table(Name="[Person].[StateProvince]")] public partial class StateProvince : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _StateProvinceID; private string _StateProvinceCode; private string _CountryRegionCode; private bool _IsOnlyStateProvinceFlag; private string _Name; private int _TerritoryID; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet
_Address; private EntityRef _CountryRegion; private EntityRef _SalesTerritory; private EntitySet _SalesTaxRate; public StateProvince() { this._Address = new EntitySet
(new Notification
(this.attach_Address), new Notification
(this.detach_Address)); this._CountryRegion = default(EntityRef); this._SalesTerritory = default(EntityRef); this._SalesTaxRate = new EntitySet(new Notification(this.attach_SalesTaxRate), new Notification(this.detach_SalesTaxRate)); } [Column(Storage="_StateProvinceID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int StateProvinceID { get { return this._StateProvinceID; } set { if ((this._StateProvinceID != value)) { this.OnPropertyChanging("StateProvinceID"); this._StateProvinceID = value; this.OnPropertyChanged("StateProvinceID"); } } } [Column(Storage="_StateProvinceCode", DBType="NChar(3) NOT NULL")] public string StateProvinceCode { get { return this._StateProvinceCode; } set { if ((this._StateProvinceCode != value)) { this.OnPropertyChanging("StateProvinceCode"); this._StateProvinceCode = value; this.OnPropertyChanged("StateProvinceCode"); } } } [Column(Storage="_CountryRegionCode", DBType="NVarChar(3) NOT NULL")] public string CountryRegionCode { get { return this._CountryRegionCode; } set { if ((this._CountryRegionCode != value)) { this.OnPropertyChanging("CountryRegionCode"); this._CountryRegionCode = value; this.OnPropertyChanged("CountryRegionCode"); } } } [Column(Storage="_IsOnlyStateProvinceFlag", DBType="Bit NOT NULL")] public bool IsOnlyStateProvinceFlag { get { return this._IsOnlyStateProvinceFlag; } set { if ((this._IsOnlyStateProvinceFlag != value)) { this.OnPropertyChanging("IsOnlyStateProvinceFlag"); this._IsOnlyStateProvinceFlag = value; this.OnPropertyChanged("IsOnlyStateProvinceFlag"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_TerritoryID", DBType="Int NOT NULL")] public int TerritoryID { get { return this._TerritoryID; } set { if ((this._TerritoryID != value)) { this.OnPropertyChanging("TerritoryID"); this._TerritoryID = value; this.OnPropertyChanged("TerritoryID"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Address_StateProvince_StateProvinceID", Storage="_Address", OtherKey="StateProvinceID")] public EntitySet
Address { get { return this._Address; } set { this._Address.Assign(value); } } [Association(Name="FK_StateProvince_CountryRegion_CountryRegionCode", Storage="_CountryRegion", ThisKey="CountryRegionCode", IsParent=true)] public CountryRegion CountryRegion { get { return this._CountryRegion.Entity; } set { CountryRegion v = this._CountryRegion.Entity; if ((v != value)) { this.OnPropertyChanging("CountryRegion"); if ((v != null)) { this._CountryRegion.Entity = null; v.StateProvince.Remove(this); } this._CountryRegion.Entity = value; if ((value != null)) { value.StateProvince.Add(this); } this.OnPropertyChanged("CountryRegion"); } } } [Association(Name="FK_StateProvince_SalesTerritory_TerritoryID", Storage="_SalesTerritory", ThisKey="TerritoryID", IsParent=true)] public SalesTerritory SalesTerritory { get { return this._SalesTerritory.Entity; } set { SalesTerritory v = this._SalesTerritory.Entity; if ((v != value)) { this.OnPropertyChanging("SalesTerritory"); if ((v != null)) { this._SalesTerritory.Entity = null; v.StateProvince.Remove(this); } this._SalesTerritory.Entity = value; if ((value != null)) { value.StateProvince.Add(this); } this.OnPropertyChanged("SalesTerritory"); } } } [Association(Name="FK_SalesTaxRate_StateProvince_StateProvinceID", Storage="_SalesTaxRate", OtherKey="StateProvinceID")] public EntitySet SalesTaxRate { get { return this._SalesTaxRate; } set { this._SalesTaxRate.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_Address(Address entity) { this.OnPropertyChanging(null); entity.StateProvince = this; this.OnPropertyChanged(null); } private void detach_Address(Address entity) { this.OnPropertyChanging(null); entity.StateProvince = null; this.OnPropertyChanged(null); } private void attach_SalesTaxRate(SalesTaxRate entity) { this.OnPropertyChanging(null); entity.StateProvince = this; this.OnPropertyChanged(null); } private void detach_SalesTaxRate(SalesTaxRate entity) { this.OnPropertyChanging(null); entity.StateProvince = null; this.OnPropertyChanged(null); } } [Table(Name="AWBuildVersion")] public partial class AWBuildVersion : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private byte _SystemInformationID; private string _DatabaseVersion; private System.DateTime _VersionDate; private System.DateTime _ModifiedDate; public AWBuildVersion() { } [Column(Storage="_SystemInformationID", DBType="TinyInt NOT NULL IDENTITY", Id=true, AutoGen=true)] public byte SystemInformationID { get { return this._SystemInformationID; } set { if ((this._SystemInformationID != value)) { this.OnPropertyChanging("SystemInformationID"); this._SystemInformationID = value; this.OnPropertyChanged("SystemInformationID"); } } } [Column(Name="Database Version", Storage="_DatabaseVersion", DBType="NVarChar(25) NOT NULL")] public string DatabaseVersion { get { return this._DatabaseVersion; } set { if ((this._DatabaseVersion != value)) { this.OnPropertyChanging("DatabaseVersion"); this._DatabaseVersion = value; this.OnPropertyChanged("DatabaseVersion"); } } } [Column(Storage="_VersionDate", DBType="DateTime NOT NULL")] public System.DateTime VersionDate { get { return this._VersionDate; } set { if ((this._VersionDate != value)) { this.OnPropertyChanging("VersionDate"); this._VersionDate = value; this.OnPropertyChanged("VersionDate"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="DatabaseLog")] public partial class DatabaseLog : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _DatabaseLogID; private System.DateTime _PostTime; private string _DatabaseUser; private string _Event; private string _Schema; private string _Object; private string _TSQL; private string _XmlEvent; public DatabaseLog() { } [Column(Storage="_DatabaseLogID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int DatabaseLogID { get { return this._DatabaseLogID; } set { if ((this._DatabaseLogID != value)) { this.OnPropertyChanging("DatabaseLogID"); this._DatabaseLogID = value; this.OnPropertyChanged("DatabaseLogID"); } } } [Column(Storage="_PostTime", DBType="DateTime NOT NULL")] public System.DateTime PostTime { get { return this._PostTime; } set { if ((this._PostTime != value)) { this.OnPropertyChanging("PostTime"); this._PostTime = value; this.OnPropertyChanged("PostTime"); } } } [Column(Storage="_DatabaseUser", DBType="NVarChar(128) NOT NULL")] public string DatabaseUser { get { return this._DatabaseUser; } set { if ((this._DatabaseUser != value)) { this.OnPropertyChanging("DatabaseUser"); this._DatabaseUser = value; this.OnPropertyChanged("DatabaseUser"); } } } [Column(Storage="_Event", DBType="NVarChar(128) NOT NULL")] public string Event { get { return this._Event; } set { if ((this._Event != value)) { this.OnPropertyChanging("Event"); this._Event = value; this.OnPropertyChanged("Event"); } } } [Column(Storage="_Schema", DBType="NVarChar(128)")] public string Schema { get { return this._Schema; } set { if ((this._Schema != value)) { this.OnPropertyChanging("Schema"); this._Schema = value; this.OnPropertyChanged("Schema"); } } } [Column(Storage="_Object", DBType="NVarChar(128)")] public string Object { get { return this._Object; } set { if ((this._Object != value)) { this.OnPropertyChanging("Object"); this._Object = value; this.OnPropertyChanged("Object"); } } } [Column(Storage="_TSQL", DBType="NVarChar(2147483647) NOT NULL", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string TSQL { get { return this._TSQL; } set { if ((this._TSQL != value)) { this.OnPropertyChanging("TSQL"); this._TSQL = value; this.OnPropertyChanged("TSQL"); } } } [Column(Storage="_XmlEvent", DBType="Xml NOT NULL", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string XmlEvent { get { return this._XmlEvent; } set { if ((this._XmlEvent != value)) { this.OnPropertyChanging("XmlEvent"); this._XmlEvent = value; this.OnPropertyChanged("XmlEvent"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="ErrorLog")] public partial class ErrorLog : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ErrorLogID; private System.DateTime _ErrorTime; private string _UserName; private int _ErrorNumber; private System.Nullable _ErrorSeverity; private System.Nullable _ErrorState; private string _ErrorProcedure; private System.Nullable _ErrorLine; private string _ErrorMessage; public ErrorLog() { } [Column(Storage="_ErrorLogID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ErrorLogID { get { return this._ErrorLogID; } set { if ((this._ErrorLogID != value)) { this.OnPropertyChanging("ErrorLogID"); this._ErrorLogID = value; this.OnPropertyChanged("ErrorLogID"); } } } [Column(Storage="_ErrorTime", DBType="DateTime NOT NULL")] public System.DateTime ErrorTime { get { return this._ErrorTime; } set { if ((this._ErrorTime != value)) { this.OnPropertyChanging("ErrorTime"); this._ErrorTime = value; this.OnPropertyChanged("ErrorTime"); } } } [Column(Storage="_UserName", DBType="NVarChar(128) NOT NULL")] public string UserName { get { return this._UserName; } set { if ((this._UserName != value)) { this.OnPropertyChanging("UserName"); this._UserName = value; this.OnPropertyChanged("UserName"); } } } [Column(Storage="_ErrorNumber", DBType="Int NOT NULL")] public int ErrorNumber { get { return this._ErrorNumber; } set { if ((this._ErrorNumber != value)) { this.OnPropertyChanging("ErrorNumber"); this._ErrorNumber = value; this.OnPropertyChanged("ErrorNumber"); } } } [Column(Storage="_ErrorSeverity", DBType="Int")] public System.Nullable ErrorSeverity { get { return this._ErrorSeverity; } set { if ((this._ErrorSeverity != value)) { this.OnPropertyChanging("ErrorSeverity"); this._ErrorSeverity = value; this.OnPropertyChanged("ErrorSeverity"); } } } [Column(Storage="_ErrorState", DBType="Int")] public System.Nullable ErrorState { get { return this._ErrorState; } set { if ((this._ErrorState != value)) { this.OnPropertyChanging("ErrorState"); this._ErrorState = value; this.OnPropertyChanged("ErrorState"); } } } [Column(Storage="_ErrorProcedure", DBType="NVarChar(126)")] public string ErrorProcedure { get { return this._ErrorProcedure; } set { if ((this._ErrorProcedure != value)) { this.OnPropertyChanging("ErrorProcedure"); this._ErrorProcedure = value; this.OnPropertyChanged("ErrorProcedure"); } } } [Column(Storage="_ErrorLine", DBType="Int")] public System.Nullable ErrorLine { get { return this._ErrorLine; } set { if ((this._ErrorLine != value)) { this.OnPropertyChanging("ErrorLine"); this._ErrorLine = value; this.OnPropertyChanged("ErrorLine"); } } } [Column(Storage="_ErrorMessage", DBType="NVarChar(4000) NOT NULL")] public string ErrorMessage { get { return this._ErrorMessage; } set { if ((this._ErrorMessage != value)) { this.OnPropertyChanging("ErrorMessage"); this._ErrorMessage = value; this.OnPropertyChanged("ErrorMessage"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } public partial class HumanResources : Schema { public Table Department; public Table Employee; public Table EmployeeAddress; public Table EmployeeDepartmentHistory; public Table EmployeePayHistory; public Table JobCandidate; public Table Shift; public HumanResources(DataContext context) : base(context) { } } [Table(Name="[HumanResources].[Department]")] public partial class Department : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private short _DepartmentID; private string _Name; private string _GroupName; private System.DateTime _ModifiedDate; private EntitySet _EmployeeDepartmentHistory; public Department() { this._EmployeeDepartmentHistory = new EntitySet(new Notification(this.attach_EmployeeDepartmentHistory), new Notification(this.detach_EmployeeDepartmentHistory)); } [Column(Storage="_DepartmentID", DBType="SmallInt NOT NULL IDENTITY", Id=true, AutoGen=true)] public short DepartmentID { get { return this._DepartmentID; } set { if ((this._DepartmentID != value)) { this.OnPropertyChanging("DepartmentID"); this._DepartmentID = value; this.OnPropertyChanged("DepartmentID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_GroupName", DBType="NVarChar(50) NOT NULL")] public string GroupName { get { return this._GroupName; } set { if ((this._GroupName != value)) { this.OnPropertyChanging("GroupName"); this._GroupName = value; this.OnPropertyChanged("GroupName"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeeDepartmentHistory_Department_DepartmentID", Storage="_EmployeeDepartmentHistory", OtherKey="DepartmentID")] public EntitySet EmployeeDepartmentHistory { get { return this._EmployeeDepartmentHistory; } set { this._EmployeeDepartmentHistory.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Department = this; this.OnPropertyChanged(null); } private void detach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Department = null; this.OnPropertyChanged(null); } } [Table(Name="[HumanResources].[Employee]")] public partial class Employee : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _EmployeeID; private string _NationalIDNumber; private int _ContactID; private string _LoginID; private System.Nullable _ManagerID; private string _Title; private System.DateTime _BirthDate; private string _MaritalStatus; private string _Gender; private System.DateTime _HireDate; private bool _SalariedFlag; private short _VacationHours; private short _SickLeaveHours; private bool _CurrentFlag; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef _Contact; private EntityRef _Manager; private EntitySet _EmployeeEmployeeManagerID; private EntitySet _EmployeeAddress; private EntitySet _EmployeeDepartmentHistory; private EntitySet _EmployeePayHistory; private EntitySet _JobCandidate; private EntitySet _PurchaseOrderHeader; private EntityRef _SalesPerson; public Employee() { this._Contact = default(EntityRef); this._Manager = default(EntityRef); this._EmployeeEmployeeManagerID = new EntitySet(new Notification(this.attach_EmployeeEmployeeManagerID), new Notification(this.detach_EmployeeEmployeeManagerID)); this._EmployeeAddress = new EntitySet(new Notification(this.attach_EmployeeAddress), new Notification(this.detach_EmployeeAddress)); this._EmployeeDepartmentHistory = new EntitySet(new Notification(this.attach_EmployeeDepartmentHistory), new Notification(this.detach_EmployeeDepartmentHistory)); this._EmployeePayHistory = new EntitySet(new Notification(this.attach_EmployeePayHistory), new Notification(this.detach_EmployeePayHistory)); this._JobCandidate = new EntitySet(new Notification(this.attach_JobCandidate), new Notification(this.detach_JobCandidate)); this._PurchaseOrderHeader = new EntitySet(new Notification(this.attach_PurchaseOrderHeader), new Notification(this.detach_PurchaseOrderHeader)); this._SalesPerson = default(EntityRef); } [Column(Storage="_EmployeeID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_NationalIDNumber", DBType="NVarChar(15) NOT NULL")] public string NationalIDNumber { get { return this._NationalIDNumber; } set { if ((this._NationalIDNumber != value)) { this.OnPropertyChanging("NationalIDNumber"); this._NationalIDNumber = value; this.OnPropertyChanged("NationalIDNumber"); } } } [Column(Storage="_ContactID", DBType="Int NOT NULL")] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_LoginID", DBType="NVarChar(256) NOT NULL")] public string LoginID { get { return this._LoginID; } set { if ((this._LoginID != value)) { this.OnPropertyChanging("LoginID"); this._LoginID = value; this.OnPropertyChanged("LoginID"); } } } [Column(Storage="_ManagerID", DBType="Int")] public System.Nullable ManagerID { get { return this._ManagerID; } set { if ((this._ManagerID != value)) { this.OnPropertyChanging("ManagerID"); this._ManagerID = value; this.OnPropertyChanged("ManagerID"); } } } [Column(Storage="_Title", DBType="NVarChar(50) NOT NULL")] public string Title { get { return this._Title; } set { if ((this._Title != value)) { this.OnPropertyChanging("Title"); this._Title = value; this.OnPropertyChanged("Title"); } } } [Column(Storage="_BirthDate", DBType="DateTime NOT NULL")] public System.DateTime BirthDate { get { return this._BirthDate; } set { if ((this._BirthDate != value)) { this.OnPropertyChanging("BirthDate"); this._BirthDate = value; this.OnPropertyChanged("BirthDate"); } } } [Column(Storage="_MaritalStatus", DBType="NChar(1) NOT NULL")] public string MaritalStatus { get { return this._MaritalStatus; } set { if ((this._MaritalStatus != value)) { this.OnPropertyChanging("MaritalStatus"); this._MaritalStatus = value; this.OnPropertyChanged("MaritalStatus"); } } } [Column(Storage="_Gender", DBType="NChar(1) NOT NULL")] public string Gender { get { return this._Gender; } set { if ((this._Gender != value)) { this.OnPropertyChanging("Gender"); this._Gender = value; this.OnPropertyChanged("Gender"); } } } [Column(Storage="_HireDate", DBType="DateTime NOT NULL")] public System.DateTime HireDate { get { return this._HireDate; } set { if ((this._HireDate != value)) { this.OnPropertyChanging("HireDate"); this._HireDate = value; this.OnPropertyChanged("HireDate"); } } } [Column(Storage="_SalariedFlag", DBType="Bit NOT NULL")] public bool SalariedFlag { get { return this._SalariedFlag; } set { if ((this._SalariedFlag != value)) { this.OnPropertyChanging("SalariedFlag"); this._SalariedFlag = value; this.OnPropertyChanged("SalariedFlag"); } } } [Column(Storage="_VacationHours", DBType="SmallInt NOT NULL")] public short VacationHours { get { return this._VacationHours; } set { if ((this._VacationHours != value)) { this.OnPropertyChanging("VacationHours"); this._VacationHours = value; this.OnPropertyChanged("VacationHours"); } } } [Column(Storage="_SickLeaveHours", DBType="SmallInt NOT NULL")] public short SickLeaveHours { get { return this._SickLeaveHours; } set { if ((this._SickLeaveHours != value)) { this.OnPropertyChanging("SickLeaveHours"); this._SickLeaveHours = value; this.OnPropertyChanged("SickLeaveHours"); } } } [Column(Storage="_CurrentFlag", DBType="Bit NOT NULL")] public bool CurrentFlag { get { return this._CurrentFlag; } set { if ((this._CurrentFlag != value)) { this.OnPropertyChanging("CurrentFlag"); this._CurrentFlag = value; this.OnPropertyChanged("CurrentFlag"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_Employee_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.Employee.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.Employee.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_Employee_Employee_ManagerID", Storage="_Manager", ThisKey="ManagerID", IsParent=true)] public Employee Manager { get { return this._Manager.Entity; } set { Employee v = this._Manager.Entity; if ((v != value)) { this.OnPropertyChanging("Manager"); if ((v != null)) { this._Manager.Entity = null; v.EmployeeEmployeeManagerID.Remove(this); } this._Manager.Entity = value; if ((value != null)) { value.EmployeeEmployeeManagerID.Add(this); } this.OnPropertyChanged("Manager"); } } } [Association(Name="FK_Employee_Employee_ManagerID", Storage="_EmployeeEmployeeManagerID", OtherKey="ManagerID")] public EntitySet EmployeeEmployeeManagerID { get { return this._EmployeeEmployeeManagerID; } set { this._EmployeeEmployeeManagerID.Assign(value); } } [Association(Name="FK_EmployeeAddress_Employee_EmployeeID", Storage="_EmployeeAddress", OtherKey="EmployeeID")] public EntitySet EmployeeAddress { get { return this._EmployeeAddress; } set { this._EmployeeAddress.Assign(value); } } [Association(Name="FK_EmployeeDepartmentHistory_Employee_EmployeeID", Storage="_EmployeeDepartmentHistory", OtherKey="EmployeeID")] public EntitySet EmployeeDepartmentHistory { get { return this._EmployeeDepartmentHistory; } set { this._EmployeeDepartmentHistory.Assign(value); } } [Association(Name="FK_EmployeePayHistory_Employee_EmployeeID", Storage="_EmployeePayHistory", OtherKey="EmployeeID")] public EntitySet EmployeePayHistory { get { return this._EmployeePayHistory; } set { this._EmployeePayHistory.Assign(value); } } [Association(Name="FK_JobCandidate_Employee_EmployeeID", Storage="_JobCandidate", OtherKey="EmployeeID")] public EntitySet JobCandidate { get { return this._JobCandidate; } set { this._JobCandidate.Assign(value); } } [Association(Name="FK_PurchaseOrderHeader_Employee_EmployeeID", Storage="_PurchaseOrderHeader", OtherKey="EmployeeID")] public EntitySet PurchaseOrderHeader { get { return this._PurchaseOrderHeader; } set { this._PurchaseOrderHeader.Assign(value); } } [Association(Name="FK_SalesPerson_Employee_SalesPersonID", Storage="_SalesPerson", ThisKey="EmployeeID", Unique=true)] public SalesPerson SalesPerson { get { return this._SalesPerson.Entity; } set { SalesPerson v = this._SalesPerson.Entity; if ((v != value)) { this.OnPropertyChanging("SalesPerson"); if ((v != null)) { this._SalesPerson.Entity = null; v.Employee = null; } this._SalesPerson.Entity = value; if ((value != null)) { value.Employee = this; } this.OnPropertyChanged("SalesPerson"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_EmployeeEmployeeManagerID(Employee entity) { this.OnPropertyChanging(null); entity.Manager = this; this.OnPropertyChanged(null); } private void detach_EmployeeEmployeeManagerID(Employee entity) { this.OnPropertyChanging(null); entity.Manager = null; this.OnPropertyChanged(null); } private void attach_EmployeeAddress(EmployeeAddress entity) { this.OnPropertyChanging(null); entity.Employee = this; this.OnPropertyChanged(null); } private void detach_EmployeeAddress(EmployeeAddress entity) { this.OnPropertyChanging(null); entity.Employee = null; this.OnPropertyChanged(null); } private void attach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Employee = this; this.OnPropertyChanged(null); } private void detach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Employee = null; this.OnPropertyChanged(null); } private void attach_EmployeePayHistory(EmployeePayHistory entity) { this.OnPropertyChanging(null); entity.Employee = this; this.OnPropertyChanged(null); } private void detach_EmployeePayHistory(EmployeePayHistory entity) { this.OnPropertyChanging(null); entity.Employee = null; this.OnPropertyChanged(null); } private void attach_JobCandidate(JobCandidate entity) { this.OnPropertyChanging(null); entity.Employee = this; this.OnPropertyChanged(null); } private void detach_JobCandidate(JobCandidate entity) { this.OnPropertyChanging(null); entity.Employee = null; this.OnPropertyChanged(null); } private void attach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.Employee = this; this.OnPropertyChanged(null); } private void detach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.Employee = null; this.OnPropertyChanged(null); } } [Table(Name="[HumanResources].[EmployeeAddress]")] public partial class EmployeeAddress : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _EmployeeID; private int _AddressID; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntityRef
_Address; private EntityRef _Employee; public EmployeeAddress() { this._Address = default(EntityRef
); this._Employee = default(EntityRef); } [Column(Storage="_EmployeeID", DBType="Int NOT NULL", Id=true)] public int EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_AddressID", DBType="Int NOT NULL", Id=true)] public int AddressID { get { return this._AddressID; } set { if ((this._AddressID != value)) { this.OnPropertyChanging("AddressID"); this._AddressID = value; this.OnPropertyChanged("AddressID"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeeAddress_Address_AddressID", Storage="_Address", ThisKey="AddressID", IsParent=true)] public Address Address { get { return this._Address.Entity; } set { Address v = this._Address.Entity; if ((v != value)) { this.OnPropertyChanging("Address"); if ((v != null)) { this._Address.Entity = null; v.EmployeeAddress.Remove(this); } this._Address.Entity = value; if ((value != null)) { value.EmployeeAddress.Add(this); } this.OnPropertyChanged("Address"); } } } [Association(Name="FK_EmployeeAddress_Employee_EmployeeID", Storage="_Employee", ThisKey="EmployeeID", IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.EmployeeAddress.Remove(this); } this._Employee.Entity = value; if ((value != null)) { value.EmployeeAddress.Add(this); } this.OnPropertyChanged("Employee"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[HumanResources].[EmployeeDepartmentHistory]")] public partial class EmployeeDepartmentHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _EmployeeID; private short _DepartmentID; private byte _ShiftID; private System.DateTime _StartDate; private System.Nullable _EndDate; private System.DateTime _ModifiedDate; private EntityRef _Department; private EntityRef _Employee; private EntityRef _Shift; public EmployeeDepartmentHistory() { this._Department = default(EntityRef); this._Employee = default(EntityRef); this._Shift = default(EntityRef); } [Column(Storage="_EmployeeID", DBType="Int NOT NULL", Id=true)] public int EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_DepartmentID", DBType="SmallInt NOT NULL", Id=true)] public short DepartmentID { get { return this._DepartmentID; } set { if ((this._DepartmentID != value)) { this.OnPropertyChanging("DepartmentID"); this._DepartmentID = value; this.OnPropertyChanged("DepartmentID"); } } } [Column(Storage="_ShiftID", DBType="TinyInt NOT NULL", Id=true)] public byte ShiftID { get { return this._ShiftID; } set { if ((this._ShiftID != value)) { this.OnPropertyChanging("ShiftID"); this._ShiftID = value; this.OnPropertyChanged("ShiftID"); } } } [Column(Storage="_StartDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime StartDate { get { return this._StartDate; } set { if ((this._StartDate != value)) { this.OnPropertyChanging("StartDate"); this._StartDate = value; this.OnPropertyChanged("StartDate"); } } } [Column(Storage="_EndDate", DBType="DateTime")] public System.Nullable EndDate { get { return this._EndDate; } set { if ((this._EndDate != value)) { this.OnPropertyChanging("EndDate"); this._EndDate = value; this.OnPropertyChanged("EndDate"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeeDepartmentHistory_Department_DepartmentID", Storage="_Department", ThisKey="DepartmentID", IsParent=true)] public Department Department { get { return this._Department.Entity; } set { Department v = this._Department.Entity; if ((v != value)) { this.OnPropertyChanging("Department"); if ((v != null)) { this._Department.Entity = null; v.EmployeeDepartmentHistory.Remove(this); } this._Department.Entity = value; if ((value != null)) { value.EmployeeDepartmentHistory.Add(this); } this.OnPropertyChanged("Department"); } } } [Association(Name="FK_EmployeeDepartmentHistory_Employee_EmployeeID", Storage="_Employee", ThisKey="EmployeeID", IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.EmployeeDepartmentHistory.Remove(this); } this._Employee.Entity = value; if ((value != null)) { value.EmployeeDepartmentHistory.Add(this); } this.OnPropertyChanged("Employee"); } } } [Association(Name="FK_EmployeeDepartmentHistory_Shift_ShiftID", Storage="_Shift", ThisKey="ShiftID", IsParent=true)] public Shift Shift { get { return this._Shift.Entity; } set { Shift v = this._Shift.Entity; if ((v != value)) { this.OnPropertyChanging("Shift"); if ((v != null)) { this._Shift.Entity = null; v.EmployeeDepartmentHistory.Remove(this); } this._Shift.Entity = value; if ((value != null)) { value.EmployeeDepartmentHistory.Add(this); } this.OnPropertyChanged("Shift"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[HumanResources].[EmployeePayHistory]")] public partial class EmployeePayHistory : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _EmployeeID; private System.DateTime _RateChangeDate; private decimal _Rate; private byte _PayFrequency; private System.DateTime _ModifiedDate; private EntityRef _Employee; public EmployeePayHistory() { this._Employee = default(EntityRef); } [Column(Storage="_EmployeeID", DBType="Int NOT NULL", Id=true)] public int EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_RateChangeDate", DBType="DateTime NOT NULL", Id=true)] public System.DateTime RateChangeDate { get { return this._RateChangeDate; } set { if ((this._RateChangeDate != value)) { this.OnPropertyChanging("RateChangeDate"); this._RateChangeDate = value; this.OnPropertyChanged("RateChangeDate"); } } } [Column(Storage="_Rate", DBType="Money NOT NULL")] public decimal Rate { get { return this._Rate; } set { if ((this._Rate != value)) { this.OnPropertyChanging("Rate"); this._Rate = value; this.OnPropertyChanged("Rate"); } } } [Column(Storage="_PayFrequency", DBType="TinyInt NOT NULL")] public byte PayFrequency { get { return this._PayFrequency; } set { if ((this._PayFrequency != value)) { this.OnPropertyChanging("PayFrequency"); this._PayFrequency = value; this.OnPropertyChanged("PayFrequency"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeePayHistory_Employee_EmployeeID", Storage="_Employee", ThisKey="EmployeeID", IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.EmployeePayHistory.Remove(this); } this._Employee.Entity = value; if ((value != null)) { value.EmployeePayHistory.Add(this); } this.OnPropertyChanged("Employee"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[HumanResources].[JobCandidate]")] public partial class JobCandidate : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _JobCandidateID; private System.Nullable _EmployeeID; private string _Resume; private System.DateTime _ModifiedDate; private EntityRef _Employee; public JobCandidate() { this._Employee = default(EntityRef); } [Column(Storage="_JobCandidateID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int JobCandidateID { get { return this._JobCandidateID; } set { if ((this._JobCandidateID != value)) { this.OnPropertyChanging("JobCandidateID"); this._JobCandidateID = value; this.OnPropertyChanged("JobCandidateID"); } } } [Column(Storage="_EmployeeID", DBType="Int")] public System.Nullable EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_Resume", DBType="Xml", UpdateCheck=System.Data.DLinq.UpdateCheck.Never)] public string Resume { get { return this._Resume; } set { if ((this._Resume != value)) { this.OnPropertyChanging("Resume"); this._Resume = value; this.OnPropertyChanged("Resume"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_JobCandidate_Employee_EmployeeID", Storage="_Employee", ThisKey="EmployeeID", IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.JobCandidate.Remove(this); } this._Employee.Entity = value; if ((value != null)) { value.JobCandidate.Add(this); } this.OnPropertyChanged("Employee"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[HumanResources].[Shift]")] public partial class Shift : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private byte _ShiftID; private string _Name; private System.DateTime _StartTime; private System.DateTime _EndTime; private System.DateTime _ModifiedDate; private EntitySet _EmployeeDepartmentHistory; public Shift() { this._EmployeeDepartmentHistory = new EntitySet(new Notification(this.attach_EmployeeDepartmentHistory), new Notification(this.detach_EmployeeDepartmentHistory)); } [Column(Storage="_ShiftID", DBType="TinyInt NOT NULL IDENTITY", Id=true, AutoGen=true)] public byte ShiftID { get { return this._ShiftID; } set { if ((this._ShiftID != value)) { this.OnPropertyChanging("ShiftID"); this._ShiftID = value; this.OnPropertyChanged("ShiftID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_StartTime", DBType="DateTime NOT NULL")] public System.DateTime StartTime { get { return this._StartTime; } set { if ((this._StartTime != value)) { this.OnPropertyChanging("StartTime"); this._StartTime = value; this.OnPropertyChanged("StartTime"); } } } [Column(Storage="_EndTime", DBType="DateTime NOT NULL")] public System.DateTime EndTime { get { return this._EndTime; } set { if ((this._EndTime != value)) { this.OnPropertyChanging("EndTime"); this._EndTime = value; this.OnPropertyChanged("EndTime"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_EmployeeDepartmentHistory_Shift_ShiftID", Storage="_EmployeeDepartmentHistory", OtherKey="ShiftID")] public EntitySet EmployeeDepartmentHistory { get { return this._EmployeeDepartmentHistory; } set { this._EmployeeDepartmentHistory.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Shift = this; this.OnPropertyChanged(null); } private void detach_EmployeeDepartmentHistory(EmployeeDepartmentHistory entity) { this.OnPropertyChanging(null); entity.Shift = null; this.OnPropertyChanged(null); } } public partial class Purchasing : Schema { public Table ProductVendor; public Table Vendor; public Table PurchaseOrderDetail; public Table VendorAddress; public Table VendorContact; public Table PurchaseOrderHeader; public Table ShipMethod; public Purchasing(DataContext context) : base(context) { } } [Table(Name="[Purchasing].[ProductVendor]")] public partial class ProductVendor : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ProductID; private int _VendorID; private int _AverageLeadTime; private decimal _StandardPrice; private System.Nullable _LastReceiptCost; private System.Nullable _LastReceiptDate; private int _MinOrderQty; private int _MaxOrderQty; private System.Nullable _OnOrderQty; private string _UnitMeasureCode; private System.DateTime _ModifiedDate; private EntityRef _Product; private EntityRef _UnitMeasure; private EntityRef _Vendor; public ProductVendor() { this._Product = default(EntityRef); this._UnitMeasure = default(EntityRef); this._Vendor = default(EntityRef); } [Column(Storage="_ProductID", DBType="Int NOT NULL", Id=true)] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_VendorID", DBType="Int NOT NULL", Id=true)] public int VendorID { get { return this._VendorID; } set { if ((this._VendorID != value)) { this.OnPropertyChanging("VendorID"); this._VendorID = value; this.OnPropertyChanged("VendorID"); } } } [Column(Storage="_AverageLeadTime", DBType="Int NOT NULL")] public int AverageLeadTime { get { return this._AverageLeadTime; } set { if ((this._AverageLeadTime != value)) { this.OnPropertyChanging("AverageLeadTime"); this._AverageLeadTime = value; this.OnPropertyChanged("AverageLeadTime"); } } } [Column(Storage="_StandardPrice", DBType="Money NOT NULL")] public decimal StandardPrice { get { return this._StandardPrice; } set { if ((this._StandardPrice != value)) { this.OnPropertyChanging("StandardPrice"); this._StandardPrice = value; this.OnPropertyChanged("StandardPrice"); } } } [Column(Storage="_LastReceiptCost", DBType="Money")] public System.Nullable LastReceiptCost { get { return this._LastReceiptCost; } set { if ((this._LastReceiptCost != value)) { this.OnPropertyChanging("LastReceiptCost"); this._LastReceiptCost = value; this.OnPropertyChanged("LastReceiptCost"); } } } [Column(Storage="_LastReceiptDate", DBType="DateTime")] public System.Nullable LastReceiptDate { get { return this._LastReceiptDate; } set { if ((this._LastReceiptDate != value)) { this.OnPropertyChanging("LastReceiptDate"); this._LastReceiptDate = value; this.OnPropertyChanged("LastReceiptDate"); } } } [Column(Storage="_MinOrderQty", DBType="Int NOT NULL")] public int MinOrderQty { get { return this._MinOrderQty; } set { if ((this._MinOrderQty != value)) { this.OnPropertyChanging("MinOrderQty"); this._MinOrderQty = value; this.OnPropertyChanged("MinOrderQty"); } } } [Column(Storage="_MaxOrderQty", DBType="Int NOT NULL")] public int MaxOrderQty { get { return this._MaxOrderQty; } set { if ((this._MaxOrderQty != value)) { this.OnPropertyChanging("MaxOrderQty"); this._MaxOrderQty = value; this.OnPropertyChanged("MaxOrderQty"); } } } [Column(Storage="_OnOrderQty", DBType="Int")] public System.Nullable OnOrderQty { get { return this._OnOrderQty; } set { if ((this._OnOrderQty != value)) { this.OnPropertyChanging("OnOrderQty"); this._OnOrderQty = value; this.OnPropertyChanged("OnOrderQty"); } } } [Column(Storage="_UnitMeasureCode", DBType="NChar(3) NOT NULL")] public string UnitMeasureCode { get { return this._UnitMeasureCode; } set { if ((this._UnitMeasureCode != value)) { this.OnPropertyChanging("UnitMeasureCode"); this._UnitMeasureCode = value; this.OnPropertyChanged("UnitMeasureCode"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductVendor_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.ProductVendor.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.ProductVendor.Add(this); } this.OnPropertyChanged("Product"); } } } [Association(Name="FK_ProductVendor_UnitMeasure_UnitMeasureCode", Storage="_UnitMeasure", ThisKey="UnitMeasureCode", IsParent=true)] public UnitMeasure UnitMeasure { get { return this._UnitMeasure.Entity; } set { UnitMeasure v = this._UnitMeasure.Entity; if ((v != value)) { this.OnPropertyChanging("UnitMeasure"); if ((v != null)) { this._UnitMeasure.Entity = null; v.ProductVendor.Remove(this); } this._UnitMeasure.Entity = value; if ((value != null)) { value.ProductVendor.Add(this); } this.OnPropertyChanged("UnitMeasure"); } } } [Association(Name="FK_ProductVendor_Vendor_VendorID", Storage="_Vendor", ThisKey="VendorID", IsParent=true)] public Vendor Vendor { get { return this._Vendor.Entity; } set { Vendor v = this._Vendor.Entity; if ((v != value)) { this.OnPropertyChanging("Vendor"); if ((v != null)) { this._Vendor.Entity = null; v.ProductVendor.Remove(this); } this._Vendor.Entity = value; if ((value != null)) { value.ProductVendor.Add(this); } this.OnPropertyChanged("Vendor"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Purchasing].[Vendor]")] public partial class Vendor : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _VendorID; private string _AccountNumber; private string _Name; private byte _CreditRating; private bool _PreferredVendorStatus; private bool _ActiveFlag; private string _PurchasingWebServiceURL; private System.DateTime _ModifiedDate; private EntitySet _ProductVendor; private EntitySet _PurchaseOrderHeader; private EntitySet _VendorAddress; private EntitySet _VendorContact; public Vendor() { this._ProductVendor = new EntitySet(new Notification(this.attach_ProductVendor), new Notification(this.detach_ProductVendor)); this._PurchaseOrderHeader = new EntitySet(new Notification(this.attach_PurchaseOrderHeader), new Notification(this.detach_PurchaseOrderHeader)); this._VendorAddress = new EntitySet(new Notification(this.attach_VendorAddress), new Notification(this.detach_VendorAddress)); this._VendorContact = new EntitySet(new Notification(this.attach_VendorContact), new Notification(this.detach_VendorContact)); } [Column(Storage="_VendorID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int VendorID { get { return this._VendorID; } set { if ((this._VendorID != value)) { this.OnPropertyChanging("VendorID"); this._VendorID = value; this.OnPropertyChanged("VendorID"); } } } [Column(Storage="_AccountNumber", DBType="NVarChar(15) NOT NULL")] public string AccountNumber { get { return this._AccountNumber; } set { if ((this._AccountNumber != value)) { this.OnPropertyChanging("AccountNumber"); this._AccountNumber = value; this.OnPropertyChanged("AccountNumber"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_CreditRating", DBType="TinyInt NOT NULL")] public byte CreditRating { get { return this._CreditRating; } set { if ((this._CreditRating != value)) { this.OnPropertyChanging("CreditRating"); this._CreditRating = value; this.OnPropertyChanged("CreditRating"); } } } [Column(Storage="_PreferredVendorStatus", DBType="Bit NOT NULL")] public bool PreferredVendorStatus { get { return this._PreferredVendorStatus; } set { if ((this._PreferredVendorStatus != value)) { this.OnPropertyChanging("PreferredVendorStatus"); this._PreferredVendorStatus = value; this.OnPropertyChanged("PreferredVendorStatus"); } } } [Column(Storage="_ActiveFlag", DBType="Bit NOT NULL")] public bool ActiveFlag { get { return this._ActiveFlag; } set { if ((this._ActiveFlag != value)) { this.OnPropertyChanging("ActiveFlag"); this._ActiveFlag = value; this.OnPropertyChanged("ActiveFlag"); } } } [Column(Storage="_PurchasingWebServiceURL", DBType="NVarChar(1024)")] public string PurchasingWebServiceURL { get { return this._PurchasingWebServiceURL; } set { if ((this._PurchasingWebServiceURL != value)) { this.OnPropertyChanging("PurchasingWebServiceURL"); this._PurchasingWebServiceURL = value; this.OnPropertyChanged("PurchasingWebServiceURL"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_ProductVendor_Vendor_VendorID", Storage="_ProductVendor", OtherKey="VendorID")] public EntitySet ProductVendor { get { return this._ProductVendor; } set { this._ProductVendor.Assign(value); } } [Association(Name="FK_PurchaseOrderHeader_Vendor_VendorID", Storage="_PurchaseOrderHeader", OtherKey="VendorID")] public EntitySet PurchaseOrderHeader { get { return this._PurchaseOrderHeader; } set { this._PurchaseOrderHeader.Assign(value); } } [Association(Name="FK_VendorAddress_Vendor_VendorID", Storage="_VendorAddress", OtherKey="VendorID")] public EntitySet VendorAddress { get { return this._VendorAddress; } set { this._VendorAddress.Assign(value); } } [Association(Name="FK_VendorContact_Vendor_VendorID", Storage="_VendorContact", OtherKey="VendorID")] public EntitySet VendorContact { get { return this._VendorContact; } set { this._VendorContact.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.Vendor = this; this.OnPropertyChanged(null); } private void detach_ProductVendor(ProductVendor entity) { this.OnPropertyChanging(null); entity.Vendor = null; this.OnPropertyChanged(null); } private void attach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.Vendor = this; this.OnPropertyChanged(null); } private void detach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.Vendor = null; this.OnPropertyChanged(null); } private void attach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.Vendor = this; this.OnPropertyChanged(null); } private void detach_VendorAddress(VendorAddress entity) { this.OnPropertyChanging(null); entity.Vendor = null; this.OnPropertyChanged(null); } private void attach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.Vendor = this; this.OnPropertyChanged(null); } private void detach_VendorContact(VendorContact entity) { this.OnPropertyChanging(null); entity.Vendor = null; this.OnPropertyChanged(null); } } [Table(Name="[Purchasing].[PurchaseOrderDetail]")] public partial class PurchaseOrderDetail : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _PurchaseOrderID; private int _PurchaseOrderDetailID; private System.DateTime _DueDate; private short _OrderQty; private int _ProductID; private decimal _UnitPrice; private decimal _LineTotal; private decimal _ReceivedQty; private decimal _RejectedQty; private decimal _StockedQty; private System.DateTime _ModifiedDate; private EntityRef _Product; private EntityRef _PurchaseOrderHeader; public PurchaseOrderDetail() { this._LineTotal = default(decimal); this._StockedQty = default(decimal); this._Product = default(EntityRef); this._PurchaseOrderHeader = default(EntityRef); } [Column(Storage="_PurchaseOrderID", DBType="Int NOT NULL", Id=true)] public int PurchaseOrderID { get { return this._PurchaseOrderID; } set { if ((this._PurchaseOrderID != value)) { this.OnPropertyChanging("PurchaseOrderID"); this._PurchaseOrderID = value; this.OnPropertyChanged("PurchaseOrderID"); } } } [Column(Storage="_PurchaseOrderDetailID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int PurchaseOrderDetailID { get { return this._PurchaseOrderDetailID; } set { if ((this._PurchaseOrderDetailID != value)) { this.OnPropertyChanging("PurchaseOrderDetailID"); this._PurchaseOrderDetailID = value; this.OnPropertyChanged("PurchaseOrderDetailID"); } } } [Column(Storage="_DueDate", DBType="DateTime NOT NULL")] public System.DateTime DueDate { get { return this._DueDate; } set { if ((this._DueDate != value)) { this.OnPropertyChanging("DueDate"); this._DueDate = value; this.OnPropertyChanged("DueDate"); } } } [Column(Storage="_OrderQty", DBType="SmallInt NOT NULL")] public short OrderQty { get { return this._OrderQty; } set { if ((this._OrderQty != value)) { this.OnPropertyChanging("OrderQty"); this._OrderQty = value; this.OnPropertyChanged("OrderQty"); } } } [Column(Storage="_ProductID", DBType="Int NOT NULL")] public int ProductID { get { return this._ProductID; } set { if ((this._ProductID != value)) { this.OnPropertyChanging("ProductID"); this._ProductID = value; this.OnPropertyChanged("ProductID"); } } } [Column(Storage="_UnitPrice", DBType="Money NOT NULL")] public decimal UnitPrice { get { return this._UnitPrice; } set { if ((this._UnitPrice != value)) { this.OnPropertyChanging("UnitPrice"); this._UnitPrice = value; this.OnPropertyChanged("UnitPrice"); } } } [Column(Storage="_LineTotal", DBType="Money NOT NULL")] public decimal LineTotal { get { return this._LineTotal; } } [Column(Storage="_ReceivedQty", DBType="Decimal(8,2) NOT NULL")] public decimal ReceivedQty { get { return this._ReceivedQty; } set { if ((this._ReceivedQty != value)) { this.OnPropertyChanging("ReceivedQty"); this._ReceivedQty = value; this.OnPropertyChanged("ReceivedQty"); } } } [Column(Storage="_RejectedQty", DBType="Decimal(8,2) NOT NULL")] public decimal RejectedQty { get { return this._RejectedQty; } set { if ((this._RejectedQty != value)) { this.OnPropertyChanging("RejectedQty"); this._RejectedQty = value; this.OnPropertyChanged("RejectedQty"); } } } [Column(Storage="_StockedQty", DBType="Decimal(9,2) NOT NULL")] public decimal StockedQty { get { return this._StockedQty; } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_PurchaseOrderDetail_Product_ProductID", Storage="_Product", ThisKey="ProductID", IsParent=true)] public Product Product { get { return this._Product.Entity; } set { Product v = this._Product.Entity; if ((v != value)) { this.OnPropertyChanging("Product"); if ((v != null)) { this._Product.Entity = null; v.PurchaseOrderDetail.Remove(this); } this._Product.Entity = value; if ((value != null)) { value.PurchaseOrderDetail.Add(this); } this.OnPropertyChanged("Product"); } } } [Association(Name="FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", Storage="_PurchaseOrderHeader", ThisKey="PurchaseOrderID", IsParent=true)] public PurchaseOrderHeader PurchaseOrderHeader { get { return this._PurchaseOrderHeader.Entity; } set { PurchaseOrderHeader v = this._PurchaseOrderHeader.Entity; if ((v != value)) { this.OnPropertyChanging("PurchaseOrderHeader"); if ((v != null)) { this._PurchaseOrderHeader.Entity = null; v.PurchaseOrderDetail.Remove(this); } this._PurchaseOrderHeader.Entity = value; if ((value != null)) { value.PurchaseOrderDetail.Add(this); } this.OnPropertyChanged("PurchaseOrderHeader"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Purchasing].[VendorAddress]")] public partial class VendorAddress : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _VendorID; private int _AddressID; private int _AddressTypeID; private System.DateTime _ModifiedDate; private EntityRef
_Address; private EntityRef _AddressType; private EntityRef _Vendor; public VendorAddress() { this._Address = default(EntityRef
); this._AddressType = default(EntityRef); this._Vendor = default(EntityRef); } [Column(Storage="_VendorID", DBType="Int NOT NULL", Id=true)] public int VendorID { get { return this._VendorID; } set { if ((this._VendorID != value)) { this.OnPropertyChanging("VendorID"); this._VendorID = value; this.OnPropertyChanged("VendorID"); } } } [Column(Storage="_AddressID", DBType="Int NOT NULL", Id=true)] public int AddressID { get { return this._AddressID; } set { if ((this._AddressID != value)) { this.OnPropertyChanging("AddressID"); this._AddressID = value; this.OnPropertyChanged("AddressID"); } } } [Column(Storage="_AddressTypeID", DBType="Int NOT NULL")] public int AddressTypeID { get { return this._AddressTypeID; } set { if ((this._AddressTypeID != value)) { this.OnPropertyChanging("AddressTypeID"); this._AddressTypeID = value; this.OnPropertyChanged("AddressTypeID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_VendorAddress_Address_AddressID", Storage="_Address", ThisKey="AddressID", IsParent=true)] public Address Address { get { return this._Address.Entity; } set { Address v = this._Address.Entity; if ((v != value)) { this.OnPropertyChanging("Address"); if ((v != null)) { this._Address.Entity = null; v.VendorAddress.Remove(this); } this._Address.Entity = value; if ((value != null)) { value.VendorAddress.Add(this); } this.OnPropertyChanged("Address"); } } } [Association(Name="FK_VendorAddress_AddressType_AddressTypeID", Storage="_AddressType", ThisKey="AddressTypeID", IsParent=true)] public AddressType AddressType { get { return this._AddressType.Entity; } set { AddressType v = this._AddressType.Entity; if ((v != value)) { this.OnPropertyChanging("AddressType"); if ((v != null)) { this._AddressType.Entity = null; v.VendorAddress.Remove(this); } this._AddressType.Entity = value; if ((value != null)) { value.VendorAddress.Add(this); } this.OnPropertyChanged("AddressType"); } } } [Association(Name="FK_VendorAddress_Vendor_VendorID", Storage="_Vendor", ThisKey="VendorID", IsParent=true)] public Vendor Vendor { get { return this._Vendor.Entity; } set { Vendor v = this._Vendor.Entity; if ((v != value)) { this.OnPropertyChanging("Vendor"); if ((v != null)) { this._Vendor.Entity = null; v.VendorAddress.Remove(this); } this._Vendor.Entity = value; if ((value != null)) { value.VendorAddress.Add(this); } this.OnPropertyChanged("Vendor"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Purchasing].[VendorContact]")] public partial class VendorContact : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _VendorID; private int _ContactID; private int _ContactTypeID; private System.DateTime _ModifiedDate; private EntityRef _Contact; private EntityRef _ContactType; private EntityRef _Vendor; public VendorContact() { this._Contact = default(EntityRef); this._ContactType = default(EntityRef); this._Vendor = default(EntityRef); } [Column(Storage="_VendorID", DBType="Int NOT NULL", Id=true)] public int VendorID { get { return this._VendorID; } set { if ((this._VendorID != value)) { this.OnPropertyChanging("VendorID"); this._VendorID = value; this.OnPropertyChanged("VendorID"); } } } [Column(Storage="_ContactID", DBType="Int NOT NULL", Id=true)] public int ContactID { get { return this._ContactID; } set { if ((this._ContactID != value)) { this.OnPropertyChanging("ContactID"); this._ContactID = value; this.OnPropertyChanged("ContactID"); } } } [Column(Storage="_ContactTypeID", DBType="Int NOT NULL")] public int ContactTypeID { get { return this._ContactTypeID; } set { if ((this._ContactTypeID != value)) { this.OnPropertyChanging("ContactTypeID"); this._ContactTypeID = value; this.OnPropertyChanged("ContactTypeID"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_VendorContact_Contact_ContactID", Storage="_Contact", ThisKey="ContactID", IsParent=true)] public Contact Contact { get { return this._Contact.Entity; } set { Contact v = this._Contact.Entity; if ((v != value)) { this.OnPropertyChanging("Contact"); if ((v != null)) { this._Contact.Entity = null; v.VendorContact.Remove(this); } this._Contact.Entity = value; if ((value != null)) { value.VendorContact.Add(this); } this.OnPropertyChanged("Contact"); } } } [Association(Name="FK_VendorContact_ContactType_ContactTypeID", Storage="_ContactType", ThisKey="ContactTypeID", IsParent=true)] public ContactType ContactType { get { return this._ContactType.Entity; } set { ContactType v = this._ContactType.Entity; if ((v != value)) { this.OnPropertyChanging("ContactType"); if ((v != null)) { this._ContactType.Entity = null; v.VendorContact.Remove(this); } this._ContactType.Entity = value; if ((value != null)) { value.VendorContact.Add(this); } this.OnPropertyChanged("ContactType"); } } } [Association(Name="FK_VendorContact_Vendor_VendorID", Storage="_Vendor", ThisKey="VendorID", IsParent=true)] public Vendor Vendor { get { return this._Vendor.Entity; } set { Vendor v = this._Vendor.Entity; if ((v != value)) { this.OnPropertyChanging("Vendor"); if ((v != null)) { this._Vendor.Entity = null; v.VendorContact.Remove(this); } this._Vendor.Entity = value; if ((value != null)) { value.VendorContact.Add(this); } this.OnPropertyChanged("Vendor"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } } [Table(Name="[Purchasing].[PurchaseOrderHeader]")] public partial class PurchaseOrderHeader : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _PurchaseOrderID; private byte _RevisionNumber; private byte _Status; private int _EmployeeID; private int _VendorID; private int _ShipMethodID; private System.DateTime _OrderDate; private System.Nullable _ShipDate; private decimal _SubTotal; private decimal _TaxAmt; private decimal _Freight; private System.DateTime _ModifiedDate; private decimal _TotalDue; private EntitySet _PurchaseOrderDetail; private EntityRef _Employee; private EntityRef _ShipMethod; private EntityRef _Vendor; public PurchaseOrderHeader() { this._TotalDue = default(decimal); this._PurchaseOrderDetail = new EntitySet(new Notification(this.attach_PurchaseOrderDetail), new Notification(this.detach_PurchaseOrderDetail)); this._Employee = default(EntityRef); this._ShipMethod = default(EntityRef); this._Vendor = default(EntityRef); } [Column(Storage="_PurchaseOrderID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int PurchaseOrderID { get { return this._PurchaseOrderID; } set { if ((this._PurchaseOrderID != value)) { this.OnPropertyChanging("PurchaseOrderID"); this._PurchaseOrderID = value; this.OnPropertyChanged("PurchaseOrderID"); } } } [Column(Storage="_RevisionNumber", DBType="TinyInt NOT NULL")] public byte RevisionNumber { get { return this._RevisionNumber; } set { if ((this._RevisionNumber != value)) { this.OnPropertyChanging("RevisionNumber"); this._RevisionNumber = value; this.OnPropertyChanged("RevisionNumber"); } } } [Column(Storage="_Status", DBType="TinyInt NOT NULL")] public byte Status { get { return this._Status; } set { if ((this._Status != value)) { this.OnPropertyChanging("Status"); this._Status = value; this.OnPropertyChanged("Status"); } } } [Column(Storage="_EmployeeID", DBType="Int NOT NULL")] public int EmployeeID { get { return this._EmployeeID; } set { if ((this._EmployeeID != value)) { this.OnPropertyChanging("EmployeeID"); this._EmployeeID = value; this.OnPropertyChanged("EmployeeID"); } } } [Column(Storage="_VendorID", DBType="Int NOT NULL")] public int VendorID { get { return this._VendorID; } set { if ((this._VendorID != value)) { this.OnPropertyChanging("VendorID"); this._VendorID = value; this.OnPropertyChanged("VendorID"); } } } [Column(Storage="_ShipMethodID", DBType="Int NOT NULL")] public int ShipMethodID { get { return this._ShipMethodID; } set { if ((this._ShipMethodID != value)) { this.OnPropertyChanging("ShipMethodID"); this._ShipMethodID = value; this.OnPropertyChanged("ShipMethodID"); } } } [Column(Storage="_OrderDate", DBType="DateTime NOT NULL")] public System.DateTime OrderDate { get { return this._OrderDate; } set { if ((this._OrderDate != value)) { this.OnPropertyChanging("OrderDate"); this._OrderDate = value; this.OnPropertyChanged("OrderDate"); } } } [Column(Storage="_ShipDate", DBType="DateTime")] public System.Nullable ShipDate { get { return this._ShipDate; } set { if ((this._ShipDate != value)) { this.OnPropertyChanging("ShipDate"); this._ShipDate = value; this.OnPropertyChanged("ShipDate"); } } } [Column(Storage="_SubTotal", DBType="Money NOT NULL")] public decimal SubTotal { get { return this._SubTotal; } set { if ((this._SubTotal != value)) { this.OnPropertyChanging("SubTotal"); this._SubTotal = value; this.OnPropertyChanged("SubTotal"); } } } [Column(Storage="_TaxAmt", DBType="Money NOT NULL")] public decimal TaxAmt { get { return this._TaxAmt; } set { if ((this._TaxAmt != value)) { this.OnPropertyChanging("TaxAmt"); this._TaxAmt = value; this.OnPropertyChanged("TaxAmt"); } } } [Column(Storage="_Freight", DBType="Money NOT NULL")] public decimal Freight { get { return this._Freight; } set { if ((this._Freight != value)) { this.OnPropertyChanging("Freight"); this._Freight = value; this.OnPropertyChanged("Freight"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Column(Storage="_TotalDue", DBType="Money NOT NULL")] public decimal TotalDue { get { return this._TotalDue; } } [Association(Name="FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", Storage="_PurchaseOrderDetail", OtherKey="PurchaseOrderID")] public EntitySet PurchaseOrderDetail { get { return this._PurchaseOrderDetail; } set { this._PurchaseOrderDetail.Assign(value); } } [Association(Name="FK_PurchaseOrderHeader_Employee_EmployeeID", Storage="_Employee", ThisKey="EmployeeID", IsParent=true)] public Employee Employee { get { return this._Employee.Entity; } set { Employee v = this._Employee.Entity; if ((v != value)) { this.OnPropertyChanging("Employee"); if ((v != null)) { this._Employee.Entity = null; v.PurchaseOrderHeader.Remove(this); } this._Employee.Entity = value; if ((value != null)) { value.PurchaseOrderHeader.Add(this); } this.OnPropertyChanged("Employee"); } } } [Association(Name="FK_PurchaseOrderHeader_ShipMethod_ShipMethodID", Storage="_ShipMethod", ThisKey="ShipMethodID", IsParent=true)] public ShipMethod ShipMethod { get { return this._ShipMethod.Entity; } set { ShipMethod v = this._ShipMethod.Entity; if ((v != value)) { this.OnPropertyChanging("ShipMethod"); if ((v != null)) { this._ShipMethod.Entity = null; v.PurchaseOrderHeader.Remove(this); } this._ShipMethod.Entity = value; if ((value != null)) { value.PurchaseOrderHeader.Add(this); } this.OnPropertyChanged("ShipMethod"); } } } [Association(Name="FK_PurchaseOrderHeader_Vendor_VendorID", Storage="_Vendor", ThisKey="VendorID", IsParent=true)] public Vendor Vendor { get { return this._Vendor.Entity; } set { Vendor v = this._Vendor.Entity; if ((v != value)) { this.OnPropertyChanging("Vendor"); if ((v != null)) { this._Vendor.Entity = null; v.PurchaseOrderHeader.Remove(this); } this._Vendor.Entity = value; if ((value != null)) { value.PurchaseOrderHeader.Add(this); } this.OnPropertyChanged("Vendor"); } } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_PurchaseOrderDetail(PurchaseOrderDetail entity) { this.OnPropertyChanging(null); entity.PurchaseOrderHeader = this; this.OnPropertyChanged(null); } private void detach_PurchaseOrderDetail(PurchaseOrderDetail entity) { this.OnPropertyChanging(null); entity.PurchaseOrderHeader = null; this.OnPropertyChanged(null); } } [Table(Name="[Purchasing].[ShipMethod]")] public partial class ShipMethod : System.Data.DLinq.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged { private int _ShipMethodID; private string _Name; private decimal _ShipBase; private decimal _ShipRate; private System.Guid _Rowguid; private System.DateTime _ModifiedDate; private EntitySet _PurchaseOrderHeader; private EntitySet _SalesOrderHeader; public ShipMethod() { this._PurchaseOrderHeader = new EntitySet(new Notification(this.attach_PurchaseOrderHeader), new Notification(this.detach_PurchaseOrderHeader)); this._SalesOrderHeader = new EntitySet(new Notification(this.attach_SalesOrderHeader), new Notification(this.detach_SalesOrderHeader)); } [Column(Storage="_ShipMethodID", DBType="Int NOT NULL IDENTITY", Id=true, AutoGen=true)] public int ShipMethodID { get { return this._ShipMethodID; } set { if ((this._ShipMethodID != value)) { this.OnPropertyChanging("ShipMethodID"); this._ShipMethodID = value; this.OnPropertyChanged("ShipMethodID"); } } } [Column(Storage="_Name", DBType="NVarChar(50) NOT NULL")] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnPropertyChanging("Name"); this._Name = value; this.OnPropertyChanged("Name"); } } } [Column(Storage="_ShipBase", DBType="Money NOT NULL")] public decimal ShipBase { get { return this._ShipBase; } set { if ((this._ShipBase != value)) { this.OnPropertyChanging("ShipBase"); this._ShipBase = value; this.OnPropertyChanged("ShipBase"); } } } [Column(Storage="_ShipRate", DBType="Money NOT NULL")] public decimal ShipRate { get { return this._ShipRate; } set { if ((this._ShipRate != value)) { this.OnPropertyChanging("ShipRate"); this._ShipRate = value; this.OnPropertyChanged("ShipRate"); } } } [Column(Name="rowguid", Storage="_Rowguid", DBType="UniqueIdentifier NOT NULL")] public System.Guid Rowguid { get { return this._Rowguid; } set { if ((this._Rowguid != value)) { this.OnPropertyChanging("Rowguid"); this._Rowguid = value; this.OnPropertyChanged("Rowguid"); } } } [Column(Storage="_ModifiedDate", DBType="DateTime NOT NULL")] public System.DateTime ModifiedDate { get { return this._ModifiedDate; } set { if ((this._ModifiedDate != value)) { this.OnPropertyChanging("ModifiedDate"); this._ModifiedDate = value; this.OnPropertyChanged("ModifiedDate"); } } } [Association(Name="FK_PurchaseOrderHeader_ShipMethod_ShipMethodID", Storage="_PurchaseOrderHeader", OtherKey="ShipMethodID")] public EntitySet PurchaseOrderHeader { get { return this._PurchaseOrderHeader; } set { this._PurchaseOrderHeader.Assign(value); } } [Association(Name="FK_SalesOrderHeader_ShipMethod_ShipMethodID", Storage="_SalesOrderHeader", OtherKey="ShipMethodID")] public EntitySet SalesOrderHeader { get { return this._SalesOrderHeader; } set { this._SalesOrderHeader.Assign(value); } } public event System.ComponentModel.PropertyChangedEventHandler PropertyChanging; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanging(string PropertyName) { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangedEventArgs(PropertyName)); } } protected virtual void OnPropertyChanged(string PropertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } } private void attach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipMethod = this; this.OnPropertyChanged(null); } private void detach_PurchaseOrderHeader(PurchaseOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipMethod = null; this.OnPropertyChanged(null); } private void attach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipMethod = this; this.OnPropertyChanged(null); } private void detach_SalesOrderHeader(SalesOrderHeader entity) { this.OnPropertyChanging(null); entity.ShipMethod = null; this.OnPropertyChanged(null); } }