using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.ComponentModel;
using System;


namespace PhoneAppOrders
{
    [Database(Name = "OrdersSample")]
    public class OrdersDataContext : System.Data.Linq.DataContext
    {

        public OrdersDataContext(string connection) :
            base(connection)
        {
        }

        public Table<Customer> Customers
        {
            get
            {
                return this.GetTable<Customer>();
            }
        }

        public Table<OrderDetail> OrderDetails
        {
            get
            {
                return this.GetTable<OrderDetail>();
            }
        }

        public Table<Order> Orders
        {
            get
            {
                return this.GetTable<Order>();
            }
        }

        public Table<Product> Products
        {
            get
            {
                return this.GetTable<Product>();
            }
        }
    }

    [Table(Name = "Customers")]
    public class Customer : INotifyPropertyChanging, INotifyPropertyChanged
    {

        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

        private string _CustomerID;
        private string _CompanyName;
        private string _ContactName;
        private string _ContactTitle;
        private string _Address;
        private string _City;
        private string _Region;
        private string _PostalCode;
        private string _Country;
        private string _Phone;
        private string _Fax;

        private EntitySet<Order> _Orders;

        public Customer()
        {
            this._Orders = new EntitySet<Order>(new Action<Order>(this.attach_Orders), new Action<Order>(this.detach_Orders));
        }

        [Column(Name = "Customer ID", Storage = "_CustomerID", DbType = "NVarChar(5) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
        public string CustomerID
        {
            get
            {
                return this._CustomerID;
            }
            set
            {
                if ((this._CustomerID != value))
                {
                    this.SendPropertyChanging();
                    this._CustomerID = value;
                    this.SendPropertyChanged("CustomerID");
                }
            }
        }

        [Column(Name = "Company Name", Storage = "_CompanyName", DbType = "NVarChar(40) NOT NULL", CanBeNull = false)]
        public string CompanyName
        {
            get
            {
                return this._CompanyName;
            }
            set
            {
                if ((this._CompanyName != value))
                {
                    this.SendPropertyChanging();
                    this._CompanyName = value;
                    this.SendPropertyChanged("CompanyName");
                }
            }
        }

        [Column(Name = "Contact Name", Storage = "_ContactName", DbType = "NVarChar(30)")]
        public string ContactName
        {
            get
            {
                return this._ContactName;
            }
            set
            {
                if ((this._ContactName != value))
                {
                    this.SendPropertyChanging();
                    this._ContactName = value;
                    this.SendPropertyChanged("ContactName");
                }
            }
        }

        [Column(Name = "Contact Title", Storage = "_ContactTitle", DbType = "NVarChar(30)")]
        public string ContactTitle
        {
            get
            {
                return this._ContactTitle;
            }
            set
            {
                if ((this._ContactTitle != value))
                {
                    this.SendPropertyChanging();
                    this._ContactTitle = value;
                    this.SendPropertyChanged("ContactTitle");
                }
            }
        }

        [Column(Storage = "_Address", DbType = "NVarChar(60)")]
        public string Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                if ((this._Address != value))
                {
                    this.SendPropertyChanging();
                    this._Address = value;
                    this.SendPropertyChanged("Address");
                }
            }
        }

        [Column(Storage = "_City", DbType = "NVarChar(15)")]
        public string City
        {
            get
            {
                return this._City;
            }
            set
            {
                if ((this._City != value))
                {
                    this.SendPropertyChanging();
                    this._City = value;
                    this.SendPropertyChanged("City");
                }
            }
        }

        [Column(Storage = "_Region", DbType = "NVarChar(15)")]
        public string Region
        {
            get
            {
                return this._Region;
            }
            set
            {
                if ((this._Region != value))
                {
                    this.SendPropertyChanging();
                    this._Region = value;
                    this.SendPropertyChanged("Region");
                }
            }
        }

        [Column(Name = "Postal Code", Storage = "_PostalCode", DbType = "NVarChar(10)")]
        public string PostalCode
        {
            get
            {
                return this._PostalCode;
            }
            set
            {
                if ((this._PostalCode != value))
                {
                    this.SendPropertyChanging();
                    this._PostalCode = value;
                    this.SendPropertyChanged("PostalCode");
                }
            }
        }

        [Column(Storage = "_Country", DbType = "NVarChar(15)")]
        public string Country
        {
            get
            {
                return this._Country;
            }
            set
            {
                if ((this._Country != value))
                {
                    this.SendPropertyChanging();
                    this._Country = value;
                    this.SendPropertyChanged("Country");
                }
            }
        }

        [Column(Storage = "_Phone", DbType = "NVarChar(24)")]
        public string Phone
        {
            get
            {
                return this._Phone;
            }
            set
            {
                if ((this._Phone != value))
                {
                    this.SendPropertyChanging();
                    this._Phone = value;
                    this.SendPropertyChanged("Phone");
                }
            }
        }

        [Column(Storage = "_Fax", DbType = "NVarChar(24)")]
        public string Fax
        {
            get
            {
                return this._Fax;
            }
            set
            {
                if ((this._Fax != value))
                {
                    this.SendPropertyChanging();
                    this._Fax = value;
                    this.SendPropertyChanged("Fax");
                }
            }
        }

        [Association(Name = "Customer_Order", Storage = "_Orders", ThisKey = "CustomerID", OtherKey = "CustomerID")]
        public EntitySet<Order> Orders
        {
            get
            {
                return this._Orders;
            }
            set
            {
                this._Orders.Assign(value);
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void SendPropertyChanging()
        {
            if ((this.PropertyChanging != null))
            {
                this.PropertyChanging(this, emptyChangingEventArgs);
            }
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void attach_Orders(Order entity)
        {
            this.SendPropertyChanging();
            entity.Customer = this;
        }

        private void detach_Orders(Order entity)
        {
            this.SendPropertyChanging();
            entity.Customer = null;
        }
    }

    [Table(Name = "Orders")]
    public class Order : INotifyPropertyChanging, INotifyPropertyChanged
    {

        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

        private int _OrderID;
        private string _CustomerID;
        private string _ShipName;
        private string _ShipAddress;
        private string _ShipCity;
        private string _ShipRegion;
        private string _ShipPostalCode;
        private string _ShipCountry;
        private System.Nullable<int> _ShipVia;
        private System.Nullable<System.DateTime> _OrderDate;
        private System.Nullable<System.DateTime> _RequiredDate;
        private System.Nullable<System.DateTime> _ShippedDate;
        private System.Nullable<decimal> _Freight;

        private EntitySet<OrderDetail> _OrderDetails;
        private EntityRef<Customer> _Customer;

        public Order()
        {
            this._OrderDetails = new EntitySet<OrderDetail>(new Action<OrderDetail>(this.attach_OrderDetails), new Action<OrderDetail>(this.detach_OrderDetails));
            this._Customer = default(EntityRef<Customer>);
        }

        [Column(Name = "Order ID", Storage = "_OrderID", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
        public int OrderID
        {
            get
            {
                return this._OrderID;
            }
            set
            {
                if ((this._OrderID != value))
                {
                    this.SendPropertyChanging();
                    this._OrderID = value;
                    this.SendPropertyChanged("OrderID");
                }
            }
        }

        [Column(Name = "Customer ID", Storage = "_CustomerID", DbType = "NVarChar(5) NOT NULL", CanBeNull = false)]
        public string CustomerID
        {
            get
            {
                return this._CustomerID;
            }
            set
            {
                if ((this._CustomerID != value))
                {
                    this.SendPropertyChanging();
                    this._CustomerID = value;
                    this.SendPropertyChanged("CustomerID");
                }
            }
        }

        [Column(Name = "Ship Name", Storage = "_ShipName", DbType = "NVarChar(40)")]
        public string ShipName
        {
            get
            {
                return this._ShipName;
            }
            set
            {
                if ((this._ShipName != value))
                {
                    this.SendPropertyChanging();
                    this._ShipName = value;
                    this.SendPropertyChanged("ShipName");
                }
            }
        }

        [Column(Name = "Ship Address", Storage = "_ShipAddress", DbType = "NVarChar(60)")]
        public string ShipAddress
        {
            get
            {
                return this._ShipAddress;
            }
            set
            {
                if ((this._ShipAddress != value))
                {
                    this.SendPropertyChanging();
                    this._ShipAddress = value;
                    this.SendPropertyChanged("ShipAddress");
                }
            }
        }

        [Column(Name = "Ship City", Storage = "_ShipCity", DbType = "NVarChar(15)")]
        public string ShipCity
        {
            get
            {
                return this._ShipCity;
            }
            set
            {
                if ((this._ShipCity != value))
                {
                    this.SendPropertyChanging();
                    this._ShipCity = value;
                    this.SendPropertyChanged("ShipCity");
                }
            }
        }

        [Column(Name = "Ship Region", Storage = "_ShipRegion", DbType = "NVarChar(15)")]
        public string ShipRegion
        {
            get
            {
                return this._ShipRegion;
            }
            set
            {
                if ((this._ShipRegion != value))
                {
                    this.SendPropertyChanging();
                    this._ShipRegion = value;
                    this.SendPropertyChanged("ShipRegion");
                }
            }
        }

        [Column(Name = "Ship Postal Code", Storage = "_ShipPostalCode", DbType = "NVarChar(10)")]
        public string ShipPostalCode
        {
            get
            {
                return this._ShipPostalCode;
            }
            set
            {
                if ((this._ShipPostalCode != value))
                {
                    this.SendPropertyChanging();
                    this._ShipPostalCode = value;
                    this.SendPropertyChanged("ShipPostalCode");
                }
            }
        }

        [Column(Name = "Ship Country", Storage = "_ShipCountry", DbType = "NVarChar(15)")]
        public string ShipCountry
        {
            get
            {
                return this._ShipCountry;
            }
            set
            {
                if ((this._ShipCountry != value))
                {
                    this.SendPropertyChanging();
                    this._ShipCountry = value;
                    this.SendPropertyChanged("ShipCountry");
                }
            }
        }

        [Column(Name = "Ship Via", Storage = "_ShipVia", DbType = "Int")]
        public System.Nullable<int> ShipVia
        {
            get
            {
                return this._ShipVia;
            }
            set
            {
                if ((this._ShipVia != value))
                {
                    this.SendPropertyChanging();
                    this._ShipVia = value;
                    this.SendPropertyChanged("ShipVia");
                }
            }
        }

        [Column(Name = "Order Date", Storage = "_OrderDate", DbType = "DateTime")]
        public System.Nullable<System.DateTime> OrderDate
        {
            get
            {
                return this._OrderDate;
            }
            set
            {
                if ((this._OrderDate != value))
                {
                    this.SendPropertyChanging();
                    this._OrderDate = value;
                    this.SendPropertyChanged("OrderDate");
                }
            }
        }

        [Column(Name = "Required Date", Storage = "_RequiredDate", DbType = "DateTime")]
        public System.Nullable<System.DateTime> RequiredDate
        {
            get
            {
                return this._RequiredDate;
            }
            set
            {
                if ((this._RequiredDate != value))
                {
                    this.SendPropertyChanging();
                    this._RequiredDate = value;
                    this.SendPropertyChanged("RequiredDate");
                }
            }
        }

        [Column(Name = "Shipped Date", Storage = "_ShippedDate", DbType = "DateTime")]
        public System.Nullable<System.DateTime> ShippedDate
        {
            get
            {
                return this._ShippedDate;
            }
            set
            {
                if ((this._ShippedDate != value))
                {
                    this.SendPropertyChanging();
                    this._ShippedDate = value;
                    this.SendPropertyChanged("ShippedDate");
                }
            }
        }

        [Column(Storage = "_Freight", DbType = "Money")]
        public System.Nullable<decimal> Freight
        {
            get
            {
                return this._Freight;
            }
            set
            {
                if ((this._Freight != value))
                {
                    this.SendPropertyChanging();
                    this._Freight = value;
                    this.SendPropertyChanged("Freight");
                }
            }
        }

        [Association(Name = "Order_OrderDetail", Storage = "_OrderDetails", ThisKey = "OrderID", OtherKey = "OrderID")]
        public EntitySet<OrderDetail> OrderDetails
        {
            get
            {
                return this._OrderDetails;
            }
            set
            {
                this._OrderDetails.Assign(value);
            }
        }

        [Association(Name = "Customer_Order", Storage = "_Customer", ThisKey = "CustomerID", OtherKey = "CustomerID", IsForeignKey = true)]
        public Customer Customer
        {
            get
            {
                return this._Customer.Entity;
            }
            set
            {
                Customer previousValue = this._Customer.Entity;
                if (((previousValue != value)
                            || (this._Customer.HasLoadedOrAssignedValue == false)))
                {
                    this.SendPropertyChanging();
                    if ((previousValue != null))
                    {
                        this._Customer.Entity = null;
                        previousValue.Orders.Remove(this);
                    }
                    this._Customer.Entity = value;
                    if ((value != null))
                    {
                        value.Orders.Add(this);
                        this._CustomerID = value.CustomerID;
                    }
                    else
                    {
                        this._CustomerID = default(string);
                    }
                    this.SendPropertyChanged("Customer");
                }
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void SendPropertyChanging()
        {
            if ((this.PropertyChanging != null))
            {
                this.PropertyChanging(this, emptyChangingEventArgs);
            }
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void attach_OrderDetails(OrderDetail entity)
        {
            this.SendPropertyChanging();
            entity.Order = this;
        }

        private void detach_OrderDetails(OrderDetail entity)
        {
            this.SendPropertyChanging();
            entity.Order = null;
        }
    }

    [Table(Name = "Order Details")]
    public class OrderDetail : INotifyPropertyChanging, INotifyPropertyChanged
    {

        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

        private int _OrderID;
        private int _ProductID;
        private decimal _UnitPrice;
        private short _Quantity;
        private float _Discount;
        private EntityRef<Product> _Product;
        private EntityRef<Order> _Order;

        public OrderDetail()
        {
            this._Product = default(EntityRef<Product>);
            this._Order = default(EntityRef<Order>);
        }

        [Column(Name = "Order ID", Storage = "_OrderID", DbType = "Int NOT NULL", IsPrimaryKey = true)]
        public int OrderID
        {
            get
            {
                return this._OrderID;
            }
            set
            {
                if ((this._OrderID != value))
                {
                    this.SendPropertyChanging();
                    this._OrderID = value;
                    this.SendPropertyChanged("OrderID");
                }
            }
        }

        [Column(Name = "Product ID", Storage = "_ProductID", DbType = "Int NOT NULL", IsPrimaryKey = true)]
        public int ProductID
        {
            get
            {
                return this._ProductID;
            }
            set
            {
                if ((this._ProductID != value))
                {
                    this.SendPropertyChanging();
                    this._ProductID = value;
                    this.SendPropertyChanged("ProductID");
                }
            }
        }

        [Column(Name = "Unit Price", Storage = "_UnitPrice", DbType = "Money NOT NULL")]
        public decimal UnitPrice
        {
            get
            {
                return this._UnitPrice;
            }
            set
            {
                if ((this._UnitPrice != value))
                {
                    this.SendPropertyChanging();
                    this._UnitPrice = value;
                    this.SendPropertyChanged("UnitPrice");
                }
            }
        }

        [Column(Storage = "_Quantity", DbType = "SmallInt NOT NULL")]
        public short Quantity
        {
            get
            {
                return this._Quantity;
            }
            set
            {
                if ((this._Quantity != value))
                {
                    this.SendPropertyChanging();
                    this._Quantity = value;
                    this.SendPropertyChanged("Quantity");
                }
            }
        }

        [Column(Storage = "_Discount", DbType = "Real NOT NULL")]
        public float Discount
        {
            get
            {
                return this._Discount;
            }
            set
            {
                if ((this._Discount != value))
                {
                    this.SendPropertyChanging();
                    this._Discount = value;
                    this.SendPropertyChanged("Discount");
                }
            }
        }

        [Association(Name = "Product_OrderDetail", Storage = "_Product", ThisKey = "ProductID", OtherKey = "ProductID", IsForeignKey = true)]
        public Product Product
        {
            get
            {
                return this._Product.Entity;
            }
            set
            {
                Product previousValue = this._Product.Entity;
                if (((previousValue != value)
                            || (this._Product.HasLoadedOrAssignedValue == false)))
                {
                    this.SendPropertyChanging();
                    if ((previousValue != null))
                    {
                        this._Product.Entity = null;
                        previousValue.OrderDetails.Remove(this);
                    }
                    this._Product.Entity = value;
                    if ((value != null))
                    {
                        value.OrderDetails.Add(this);
                        this._ProductID = value.ProductID;
                    }
                    else
                    {
                        this._ProductID = default(int);
                    }
                    this.SendPropertyChanged("Product");
                }
            }
        }

        [Association(Name = "Order_OrderDetail", Storage = "_Order", ThisKey = "OrderID", OtherKey = "OrderID", IsForeignKey = true, DeleteOnNull = true)]
        public Order Order
        {
            get
            {
                return this._Order.Entity;
            }
            set
            {
                Order previousValue = this._Order.Entity;
                if (((previousValue != value)
                            || (this._Order.HasLoadedOrAssignedValue == false)))
                {
                    this.SendPropertyChanging();
                    if ((previousValue != null))
                    {
                        this._Order.Entity = null;
                        previousValue.OrderDetails.Remove(this);
                    }
                    this._Order.Entity = value;
                    if ((value != null))
                    {
                        value.OrderDetails.Add(this);
                        this._OrderID = value.OrderID;
                    }
                    else
                    {
                        this._OrderID = default(int);
                    }
                    this.SendPropertyChanged("Order");
                }
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void SendPropertyChanging()
        {
            if ((this.PropertyChanging != null))
            {
                this.PropertyChanging(this, emptyChangingEventArgs);
            }
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

    [Table(Name = "Products")]
    public class Product : INotifyPropertyChanging, INotifyPropertyChanged
    {

        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

        private int _ProductID;
        private string _ProductName;
        private string _EnglishName;
        private string _QuantityPerUnit;
        private System.Nullable<decimal> _UnitPrice;
        private System.Nullable<short> _UnitsInStock;
        private System.Nullable<short> _UnitsOnOrder;
        private System.Nullable<short> _ReorderLevel;
        private bool _Discontinued;

        private EntitySet<OrderDetail> _OrderDetails;

        public Product()
        {
            this._OrderDetails = new EntitySet<OrderDetail>(new Action<OrderDetail>(this.attach_OrderDetails), new Action<OrderDetail>(this.detach_OrderDetails));
        }

        [Column(Name = "Product ID", Storage = "_ProductID", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
        public int ProductID
        {
            get
            {
                return this._ProductID;
            }
            set
            {
                if ((this._ProductID != value))
                {
                    this.SendPropertyChanging();
                    this._ProductID = value;
                    this.SendPropertyChanged("ProductID");
                }
            }
        }

        [Column(Name = "Product Name", Storage = "_ProductName", DbType = "NVarChar(40) NOT NULL", CanBeNull = false)]
        public string ProductName
        {
            get
            {
                return this._ProductName;
            }
            set
            {
                if ((this._ProductName != value))
                {
                    this.SendPropertyChanging();
                    this._ProductName = value;
                    this.SendPropertyChanged("ProductName");
                }
            }
        }

        [Column(Name = "English Name", Storage = "_EnglishName", DbType = "NVarChar(40)")]
        public string EnglishName
        {
            get
            {
                return this._EnglishName;
            }
            set
            {
                if ((this._EnglishName != value))
                {
                    this.SendPropertyChanging();
                    this._EnglishName = value;
                    this.SendPropertyChanged("EnglishName");
                }
            }
        }

        [Column(Name = "Quantity Per Unit", Storage = "_QuantityPerUnit", DbType = "NVarChar(20)")]
        public string QuantityPerUnit
        {
            get
            {
                return this._QuantityPerUnit;
            }
            set
            {
                if ((this._QuantityPerUnit != value))
                {
                    this.SendPropertyChanging();
                    this._QuantityPerUnit = value;
                    this.SendPropertyChanged("QuantityPerUnit");
                }
            }
        }

        [Column(Name = "Unit Price", Storage = "_UnitPrice", DbType = "Money")]
        public System.Nullable<decimal> UnitPrice
        {
            get
            {
                return this._UnitPrice;
            }
            set
            {
                if ((this._UnitPrice != value))
                {
                    this.SendPropertyChanging();
                    this._UnitPrice = value;
                    this.SendPropertyChanged("UnitPrice");
                }
            }
        }

        [Column(Name = "Units In Stock", Storage = "_UnitsInStock", DbType = "SmallInt")]
        public System.Nullable<short> UnitsInStock
        {
            get
            {
                return this._UnitsInStock;
            }
            set
            {
                if ((this._UnitsInStock != value))
                {
                    this.SendPropertyChanging();
                    this._UnitsInStock = value;
                    this.SendPropertyChanged("UnitsInStock");
                }
            }
        }

        [Column(Name = "Units On Order", Storage = "_UnitsOnOrder", DbType = "SmallInt")]
        public System.Nullable<short> UnitsOnOrder
        {
            get
            {
                return this._UnitsOnOrder;
            }
            set
            {
                if ((this._UnitsOnOrder != value))
                {
                    this.SendPropertyChanging();
                    this._UnitsOnOrder = value;
                    this.SendPropertyChanged("UnitsOnOrder");
                }
            }
        }

        [Column(Name = "Reorder Level", Storage = "_ReorderLevel", DbType = "SmallInt")]
        public System.Nullable<short> ReorderLevel
        {
            get
            {
                return this._ReorderLevel;
            }
            set
            {
                if ((this._ReorderLevel != value))
                {
                    this.SendPropertyChanging();
                    this._ReorderLevel = value;
                    this.SendPropertyChanged("ReorderLevel");
                }
            }
        }

        [Column(Storage = "_Discontinued", DbType = "Bit NOT NULL")]
        public bool Discontinued
        {
            get
            {
                return this._Discontinued;
            }
            set
            {
                if ((this._Discontinued != value))
                {
                    this.SendPropertyChanging();
                    this._Discontinued = value;
                    this.SendPropertyChanged("Discontinued");
                }
            }
        }

        [Association(Name = "Product_OrderDetail", Storage = "_OrderDetails", ThisKey = "ProductID", OtherKey = "ProductID")]
        public EntitySet<OrderDetail> OrderDetails
        {
            get
            {
                return this._OrderDetails;
            }
            set
            {
                this._OrderDetails.Assign(value);
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void SendPropertyChanging()
        {
            if ((this.PropertyChanging != null))
            {
                this.PropertyChanging(this, emptyChangingEventArgs);
            }
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void attach_OrderDetails(OrderDetail entity)
        {
            this.SendPropertyChanging();
            entity.Product = this;
        }

        private void detach_OrderDetails(OrderDetail entity)
        {
            this.SendPropertyChanging();
            entity.Product = null;
        }
    }
}
