//------------------------------------------------------------------------------
//
// 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