1 #region Auto-generated classes for Northwind database on [TIMESTAMP]
\r
5 // | _ \| |__ | \/ | ___| |_ __ _| |
\r
6 // | | | | '_ \| |\/| |/ _ \ __/ _` | |
\r
7 // | |_| | |_) | | | | __/ || (_| | |
\r
8 // |____/|_.__/|_| |_|\___|\__\__,_|_|
\r
10 // Auto-generated from Northwind on [TIMESTAMP]
\r
11 // Please visit http://linq.to/db for more information
\r
17 using System.Data.Linq.Mapping;
\r
18 using System.Diagnostics;
\r
19 using System.Reflection;
\r
20 using System.Data.Linq;
\r
21 using System.ComponentModel;
\r
25 public partial class Northwind : DataContext
\r
27 #region Extensibility Method Definitions
\r
29 partial void OnCreated();
\r
33 public Northwind(string connectionString)
\r
34 : base(connectionString)
\r
39 public Northwind(IDbConnection connection)
\r
45 public Northwind(string connection, MappingSource mappingSource)
\r
46 : base(connection, mappingSource)
\r
51 public Northwind(IDbConnection connection, MappingSource mappingSource)
\r
52 : base(connection, mappingSource)
\r
57 public Table<Category> Categories { get { return GetTable<Category>(); } }
\r
58 public Table<Customer> Customers { get { return GetTable<Customer>(); } }
\r
59 public Table<CustomerCustomerDemo> CustomerCustomerDemo { get { return GetTable<CustomerCustomerDemo>(); } }
\r
60 public Table<CustomerDemographic> CustomerDemographics { get { return GetTable<CustomerDemographic>(); } }
\r
61 public Table<Employee> Employees { get { return GetTable<Employee>(); } }
\r
62 public Table<EmployeeTerritory> EmployeeTerritories { get { return GetTable<EmployeeTerritory>(); } }
\r
63 public Table<Order> Orders { get { return GetTable<Order>(); } }
\r
64 public Table<OrderDetail> OrderDetails { get { return GetTable<OrderDetail>(); } }
\r
65 public Table<Product> Products { get { return GetTable<Product>(); } }
\r
66 public Table<Region> Regions { get { return GetTable<Region>(); } }
\r
67 public Table<Shipper> Shippers { get { return GetTable<Shipper>(); } }
\r
68 public Table<Supplier> Suppliers { get { return GetTable<Supplier>(); } }
\r
69 public Table<Territory> Territories { get { return GetTable<Territory>(); } }
\r
73 [Table(Name = "Categories")]
\r
74 public partial class Category : INotifyPropertyChanging, INotifyPropertyChanged
\r
76 #region INotifyPropertyChanging handling
\r
78 public event PropertyChangingEventHandler PropertyChanging;
\r
80 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
81 protected virtual void SendPropertyChanging()
\r
83 if (PropertyChanging != null)
\r
85 PropertyChanging(this, emptyChangingEventArgs);
\r
91 #region INotifyPropertyChanged handling
\r
93 public event PropertyChangedEventHandler PropertyChanged;
\r
95 protected virtual void SendPropertyChanged(string propertyName)
\r
97 if (PropertyChanged != null)
\r
99 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
105 #region Extensibility Method Definitions
\r
107 partial void OnCreated();
\r
108 partial void OnCategoryIDChanged();
\r
109 partial void OnCategoryIDChanging(long value);
\r
110 partial void OnCategoryNameChanged();
\r
111 partial void OnCategoryNameChanging(string value);
\r
112 partial void OnDescriptionChanged();
\r
113 partial void OnDescriptionChanging(string value);
\r
114 partial void OnPictureChanged();
\r
115 partial void OnPictureChanging(Byte[] value);
\r
119 #region long CategoryID
\r
121 private long _categoryID;
\r
122 [DebuggerNonUserCode]
\r
123 [Column(Storage = "_categoryID", Name = "CategoryID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
124 public long CategoryID
\r
128 return _categoryID;
\r
132 if (value != _categoryID)
\r
134 OnCategoryIDChanging(value);
\r
135 SendPropertyChanging();
\r
136 _categoryID = value;
\r
137 SendPropertyChanged("CategoryID");
\r
138 OnCategoryIDChanged();
\r
145 #region string CategoryName
\r
147 private string _categoryName;
\r
148 [DebuggerNonUserCode]
\r
149 [Column(Storage = "_categoryName", Name = "CategoryName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
150 public string CategoryName
\r
154 return _categoryName;
\r
158 if (value != _categoryName)
\r
160 OnCategoryNameChanging(value);
\r
161 SendPropertyChanging();
\r
162 _categoryName = value;
\r
163 SendPropertyChanged("CategoryName");
\r
164 OnCategoryNameChanged();
\r
171 #region string Description
\r
173 private string _description;
\r
174 [DebuggerNonUserCode]
\r
175 [Column(Storage = "_description", Name = "Description", DbType = "ntext", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
176 public string Description
\r
180 return _description;
\r
184 if (value != _description)
\r
186 OnDescriptionChanging(value);
\r
187 SendPropertyChanging();
\r
188 _description = value;
\r
189 SendPropertyChanged("Description");
\r
190 OnDescriptionChanged();
\r
197 #region Byte[] Picture
\r
199 private Byte[] _picture;
\r
200 [DebuggerNonUserCode]
\r
201 [Column(Storage = "_picture", Name = "Picture", DbType = "image", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
202 public Byte[] Picture
\r
210 if (value != _picture)
\r
212 OnPictureChanging(value);
\r
213 SendPropertyChanging();
\r
215 SendPropertyChanged("Picture");
\r
216 OnPictureChanged();
\r
225 private EntitySet<Product> _products;
\r
226 [Association(Storage = "_products", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "FK_Products_1")]
\r
227 [DebuggerNonUserCode]
\r
228 public EntitySet<Product> Products
\r
243 #region Attachement handlers
\r
245 private void Products_Attach(Product entity)
\r
247 entity.Category = this;
\r
250 private void Products_Detach(Product entity)
\r
252 entity.Category = null;
\r
262 _products = new EntitySet<Product>(Products_Attach, Products_Detach);
\r
270 [Table(Name = "Customers")]
\r
271 public partial class Customer : INotifyPropertyChanging, INotifyPropertyChanged
\r
273 #region INotifyPropertyChanging handling
\r
275 public event PropertyChangingEventHandler PropertyChanging;
\r
277 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
278 protected virtual void SendPropertyChanging()
\r
280 if (PropertyChanging != null)
\r
282 PropertyChanging(this, emptyChangingEventArgs);
\r
288 #region INotifyPropertyChanged handling
\r
290 public event PropertyChangedEventHandler PropertyChanged;
\r
292 protected virtual void SendPropertyChanged(string propertyName)
\r
294 if (PropertyChanged != null)
\r
296 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
302 #region Extensibility Method Definitions
\r
304 partial void OnCreated();
\r
305 partial void OnAddressChanged();
\r
306 partial void OnAddressChanging(string value);
\r
307 partial void OnCityChanged();
\r
308 partial void OnCityChanging(string value);
\r
309 partial void OnCompanyNameChanged();
\r
310 partial void OnCompanyNameChanging(string value);
\r
311 partial void OnContactNameChanged();
\r
312 partial void OnContactNameChanging(string value);
\r
313 partial void OnContactTitleChanged();
\r
314 partial void OnContactTitleChanging(string value);
\r
315 partial void OnCountryChanged();
\r
316 partial void OnCountryChanging(string value);
\r
317 partial void OnCustomerIDChanged();
\r
318 partial void OnCustomerIDChanging(string value);
\r
319 partial void OnFaxChanged();
\r
320 partial void OnFaxChanging(string value);
\r
321 partial void OnPhoneChanged();
\r
322 partial void OnPhoneChanging(string value);
\r
323 partial void OnPostalCodeChanged();
\r
324 partial void OnPostalCodeChanging(string value);
\r
325 partial void OnRegionChanged();
\r
326 partial void OnRegionChanging(string value);
\r
330 #region string Address
\r
332 private string _address;
\r
333 [DebuggerNonUserCode]
\r
334 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
335 public string Address
\r
343 if (value != _address)
\r
345 OnAddressChanging(value);
\r
346 SendPropertyChanging();
\r
348 SendPropertyChanged("Address");
\r
349 OnAddressChanged();
\r
356 #region string City
\r
358 private string _city;
\r
359 [DebuggerNonUserCode]
\r
360 [Column(Storage = "_city", Name = "City", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
369 if (value != _city)
\r
371 OnCityChanging(value);
\r
372 SendPropertyChanging();
\r
374 SendPropertyChanged("City");
\r
382 #region string CompanyName
\r
384 private string _companyName;
\r
385 [DebuggerNonUserCode]
\r
386 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
387 public string CompanyName
\r
391 return _companyName;
\r
395 if (value != _companyName)
\r
397 OnCompanyNameChanging(value);
\r
398 SendPropertyChanging();
\r
399 _companyName = value;
\r
400 SendPropertyChanged("CompanyName");
\r
401 OnCompanyNameChanged();
\r
408 #region string ContactName
\r
410 private string _contactName;
\r
411 [DebuggerNonUserCode]
\r
412 [Column(Storage = "_contactName", Name = "ContactName", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
413 public string ContactName
\r
417 return _contactName;
\r
421 if (value != _contactName)
\r
423 OnContactNameChanging(value);
\r
424 SendPropertyChanging();
\r
425 _contactName = value;
\r
426 SendPropertyChanged("ContactName");
\r
427 OnContactNameChanged();
\r
434 #region string ContactTitle
\r
436 private string _contactTitle;
\r
437 [DebuggerNonUserCode]
\r
438 [Column(Storage = "_contactTitle", Name = "ContactTitle", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
439 public string ContactTitle
\r
443 return _contactTitle;
\r
447 if (value != _contactTitle)
\r
449 OnContactTitleChanging(value);
\r
450 SendPropertyChanging();
\r
451 _contactTitle = value;
\r
452 SendPropertyChanged("ContactTitle");
\r
453 OnContactTitleChanged();
\r
460 #region string Country
\r
462 private string _country;
\r
463 [DebuggerNonUserCode]
\r
464 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
465 public string Country
\r
473 if (value != _country)
\r
475 OnCountryChanging(value);
\r
476 SendPropertyChanging();
\r
478 SendPropertyChanged("Country");
\r
479 OnCountryChanged();
\r
486 #region string CustomerID
\r
488 private string _customerID;
\r
489 [DebuggerNonUserCode]
\r
490 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
491 public string CustomerID
\r
495 return _customerID;
\r
499 if (value != _customerID)
\r
501 OnCustomerIDChanging(value);
\r
502 SendPropertyChanging();
\r
503 _customerID = value;
\r
504 SendPropertyChanged("CustomerID");
\r
505 OnCustomerIDChanged();
\r
514 private string _fax;
\r
515 [DebuggerNonUserCode]
\r
516 [Column(Storage = "_fax", Name = "Fax", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
527 OnFaxChanging(value);
\r
528 SendPropertyChanging();
\r
530 SendPropertyChanged("Fax");
\r
538 #region string Phone
\r
540 private string _phone;
\r
541 [DebuggerNonUserCode]
\r
542 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
543 public string Phone
\r
551 if (value != _phone)
\r
553 OnPhoneChanging(value);
\r
554 SendPropertyChanging();
\r
556 SendPropertyChanged("Phone");
\r
564 #region string PostalCode
\r
566 private string _postalCode;
\r
567 [DebuggerNonUserCode]
\r
568 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
569 public string PostalCode
\r
573 return _postalCode;
\r
577 if (value != _postalCode)
\r
579 OnPostalCodeChanging(value);
\r
580 SendPropertyChanging();
\r
581 _postalCode = value;
\r
582 SendPropertyChanged("PostalCode");
\r
583 OnPostalCodeChanged();
\r
590 #region string Region
\r
592 private string _region;
\r
593 [DebuggerNonUserCode]
\r
594 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
595 public string Region
\r
603 if (value != _region)
\r
605 OnRegionChanging(value);
\r
606 SendPropertyChanging();
\r
608 SendPropertyChanged("Region");
\r
618 private EntitySet<Order> _orders;
\r
619 [Association(Storage = "_orders", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "FK_Orders_2")]
\r
620 [DebuggerNonUserCode]
\r
621 public EntitySet<Order> Orders
\r
633 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
634 [Association(Storage = "_customerCustomerDemo", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "FK_CustomerCustomerDemo_0")]
\r
635 [DebuggerNonUserCode]
\r
636 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
640 return _customerCustomerDemo;
\r
644 _customerCustomerDemo = value;
\r
651 #region Attachement handlers
\r
653 private void Orders_Attach(Order entity)
\r
655 entity.Customer = this;
\r
658 private void Orders_Detach(Order entity)
\r
660 entity.Customer = null;
\r
663 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
665 entity.Customer = this;
\r
668 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
670 entity.Customer = null;
\r
680 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
681 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(CustomerCustomerDemo_Attach, CustomerCustomerDemo_Detach);
\r
689 [Table(Name = "CustomerCustomerDemo")]
\r
690 public partial class CustomerCustomerDemo : INotifyPropertyChanging, INotifyPropertyChanged
\r
692 #region INotifyPropertyChanging handling
\r
694 public event PropertyChangingEventHandler PropertyChanging;
\r
696 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
697 protected virtual void SendPropertyChanging()
\r
699 if (PropertyChanging != null)
\r
701 PropertyChanging(this, emptyChangingEventArgs);
\r
707 #region INotifyPropertyChanged handling
\r
709 public event PropertyChangedEventHandler PropertyChanged;
\r
711 protected virtual void SendPropertyChanged(string propertyName)
\r
713 if (PropertyChanged != null)
\r
715 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
721 #region Extensibility Method Definitions
\r
723 partial void OnCreated();
\r
724 partial void OnCustomerIDChanged();
\r
725 partial void OnCustomerIDChanging(string value);
\r
726 partial void OnCustomerTypeIDChanged();
\r
727 partial void OnCustomerTypeIDChanging(string value);
\r
731 #region string CustomerID
\r
733 private string _customerID;
\r
734 [DebuggerNonUserCode]
\r
735 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
736 public string CustomerID
\r
740 return _customerID;
\r
744 if (value != _customerID)
\r
746 if (_customer.HasLoadedOrAssignedValue)
\r
748 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
750 OnCustomerIDChanging(value);
\r
751 SendPropertyChanging();
\r
752 _customerID = value;
\r
753 SendPropertyChanged("CustomerID");
\r
754 OnCustomerIDChanged();
\r
761 #region string CustomerTypeID
\r
763 private string _customerTypeID;
\r
764 [DebuggerNonUserCode]
\r
765 [Column(Storage = "_customerTypeID", Name = "CustomerTypeID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
766 public string CustomerTypeID
\r
770 return _customerTypeID;
\r
774 if (value != _customerTypeID)
\r
776 if (_customerDemographic.HasLoadedOrAssignedValue)
\r
778 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
780 OnCustomerTypeIDChanging(value);
\r
781 SendPropertyChanging();
\r
782 _customerTypeID = value;
\r
783 SendPropertyChanged("CustomerTypeID");
\r
784 OnCustomerTypeIDChanged();
\r
793 private EntityRef<Customer> _customer;
\r
794 [Association(Storage = "_customer", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "FK_CustomerCustomerDemo_0", IsForeignKey = true)]
\r
795 [DebuggerNonUserCode]
\r
796 public Customer Customer
\r
800 return _customer.Entity;
\r
804 if (value != _customer.Entity)
\r
806 if (_customer.Entity != null)
\r
808 var previousCustomer = _customer.Entity;
\r
809 _customer.Entity = null;
\r
810 previousCustomer.CustomerCustomerDemo.Remove(this);
\r
812 _customer.Entity = value;
\r
815 value.CustomerCustomerDemo.Add(this);
\r
816 _customerID = value.CustomerID;
\r
820 _customerID = default(string);
\r
826 private EntityRef<CustomerDemographic> _customerDemographic;
\r
827 [Association(Storage = "_customerDemographic", OtherKey = "CustomerTypeID", ThisKey = "CustomerTypeID", Name = "FK_CustomerCustomerDemo_1", IsForeignKey = true)]
\r
828 [DebuggerNonUserCode]
\r
829 public CustomerDemographic CustomerDemographic
\r
833 return _customerDemographic.Entity;
\r
837 if (value != _customerDemographic.Entity)
\r
839 if (_customerDemographic.Entity != null)
\r
841 var previousCustomerDemographic = _customerDemographic.Entity;
\r
842 _customerDemographic.Entity = null;
\r
843 previousCustomerDemographic.CustomerCustomerDemo.Remove(this);
\r
845 _customerDemographic.Entity = value;
\r
848 value.CustomerCustomerDemo.Add(this);
\r
849 _customerTypeID = value.CustomerTypeID;
\r
853 _customerTypeID = default(string);
\r
864 public CustomerCustomerDemo()
\r
866 _customer = new EntityRef<Customer>();
\r
867 _customerDemographic = new EntityRef<CustomerDemographic>();
\r
875 [Table(Name = "CustomerDemographics")]
\r
876 public partial class CustomerDemographic : INotifyPropertyChanging, INotifyPropertyChanged
\r
878 #region INotifyPropertyChanging handling
\r
880 public event PropertyChangingEventHandler PropertyChanging;
\r
882 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
883 protected virtual void SendPropertyChanging()
\r
885 if (PropertyChanging != null)
\r
887 PropertyChanging(this, emptyChangingEventArgs);
\r
893 #region INotifyPropertyChanged handling
\r
895 public event PropertyChangedEventHandler PropertyChanged;
\r
897 protected virtual void SendPropertyChanged(string propertyName)
\r
899 if (PropertyChanged != null)
\r
901 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
907 #region Extensibility Method Definitions
\r
909 partial void OnCreated();
\r
910 partial void OnCustomerDescChanged();
\r
911 partial void OnCustomerDescChanging(string value);
\r
912 partial void OnCustomerTypeIDChanged();
\r
913 partial void OnCustomerTypeIDChanging(string value);
\r
917 #region string CustomerDesc
\r
919 private string _customerDesc;
\r
920 [DebuggerNonUserCode]
\r
921 [Column(Storage = "_customerDesc", Name = "CustomerDesc", DbType = "ntext", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
922 public string CustomerDesc
\r
926 return _customerDesc;
\r
930 if (value != _customerDesc)
\r
932 OnCustomerDescChanging(value);
\r
933 SendPropertyChanging();
\r
934 _customerDesc = value;
\r
935 SendPropertyChanged("CustomerDesc");
\r
936 OnCustomerDescChanged();
\r
943 #region string CustomerTypeID
\r
945 private string _customerTypeID;
\r
946 [DebuggerNonUserCode]
\r
947 [Column(Storage = "_customerTypeID", Name = "CustomerTypeID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
948 public string CustomerTypeID
\r
952 return _customerTypeID;
\r
956 if (value != _customerTypeID)
\r
958 OnCustomerTypeIDChanging(value);
\r
959 SendPropertyChanging();
\r
960 _customerTypeID = value;
\r
961 SendPropertyChanged("CustomerTypeID");
\r
962 OnCustomerTypeIDChanged();
\r
971 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
972 [Association(Storage = "_customerCustomerDemo", OtherKey = "CustomerTypeID", ThisKey = "CustomerTypeID", Name = "FK_CustomerCustomerDemo_1")]
\r
973 [DebuggerNonUserCode]
\r
974 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
978 return _customerCustomerDemo;
\r
982 _customerCustomerDemo = value;
\r
989 #region Attachement handlers
\r
991 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
993 entity.CustomerDemographic = this;
\r
996 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
998 entity.CustomerDemographic = null;
\r
1006 public CustomerDemographic()
\r
1008 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(CustomerCustomerDemo_Attach, CustomerCustomerDemo_Detach);
\r
1016 [Table(Name = "Employees")]
\r
1017 public partial class Employee : INotifyPropertyChanging, INotifyPropertyChanged
\r
1019 #region INotifyPropertyChanging handling
\r
1021 public event PropertyChangingEventHandler PropertyChanging;
\r
1023 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1024 protected virtual void SendPropertyChanging()
\r
1026 if (PropertyChanging != null)
\r
1028 PropertyChanging(this, emptyChangingEventArgs);
\r
1034 #region INotifyPropertyChanged handling
\r
1036 public event PropertyChangedEventHandler PropertyChanged;
\r
1038 protected virtual void SendPropertyChanged(string propertyName)
\r
1040 if (PropertyChanged != null)
\r
1042 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1048 #region Extensibility Method Definitions
\r
1050 partial void OnCreated();
\r
1051 partial void OnAddressChanged();
\r
1052 partial void OnAddressChanging(string value);
\r
1053 partial void OnBirthDateChanged();
\r
1054 partial void OnBirthDateChanging(DateTime? value);
\r
1055 partial void OnCityChanged();
\r
1056 partial void OnCityChanging(string value);
\r
1057 partial void OnCountryChanged();
\r
1058 partial void OnCountryChanging(string value);
\r
1059 partial void OnEmployeeIDChanged();
\r
1060 partial void OnEmployeeIDChanging(long value);
\r
1061 partial void OnExtensionChanged();
\r
1062 partial void OnExtensionChanging(string value);
\r
1063 partial void OnFirstNameChanged();
\r
1064 partial void OnFirstNameChanging(string value);
\r
1065 partial void OnHireDateChanged();
\r
1066 partial void OnHireDateChanging(DateTime? value);
\r
1067 partial void OnHomePhoneChanged();
\r
1068 partial void OnHomePhoneChanging(string value);
\r
1069 partial void OnLastNameChanged();
\r
1070 partial void OnLastNameChanging(string value);
\r
1071 partial void OnNotesChanged();
\r
1072 partial void OnNotesChanging(string value);
\r
1073 partial void OnPhotoChanged();
\r
1074 partial void OnPhotoChanging(Byte[] value);
\r
1075 partial void OnPhotoPathChanged();
\r
1076 partial void OnPhotoPathChanging(string value);
\r
1077 partial void OnPostalCodeChanged();
\r
1078 partial void OnPostalCodeChanging(string value);
\r
1079 partial void OnRegionChanged();
\r
1080 partial void OnRegionChanging(string value);
\r
1081 partial void OnReportsToChanged();
\r
1082 partial void OnReportsToChanging(long? value);
\r
1083 partial void OnTitleChanged();
\r
1084 partial void OnTitleChanging(string value);
\r
1085 partial void OnTitleOfCourtesyChanged();
\r
1086 partial void OnTitleOfCourtesyChanging(string value);
\r
1090 #region string Address
\r
1092 private string _address;
\r
1093 [DebuggerNonUserCode]
\r
1094 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1095 public string Address
\r
1103 if (value != _address)
\r
1105 OnAddressChanging(value);
\r
1106 SendPropertyChanging();
\r
1108 SendPropertyChanged("Address");
\r
1109 OnAddressChanged();
\r
1116 #region DateTime? BirthDate
\r
1118 private DateTime? _birthDate;
\r
1119 [DebuggerNonUserCode]
\r
1120 [Column(Storage = "_birthDate", Name = "BirthDate", DbType = "datetime", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1121 public DateTime? BirthDate
\r
1125 return _birthDate;
\r
1129 if (value != _birthDate)
\r
1131 OnBirthDateChanging(value);
\r
1132 SendPropertyChanging();
\r
1133 _birthDate = value;
\r
1134 SendPropertyChanged("BirthDate");
\r
1135 OnBirthDateChanged();
\r
1142 #region string City
\r
1144 private string _city;
\r
1145 [DebuggerNonUserCode]
\r
1146 [Column(Storage = "_city", Name = "City", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1147 public string City
\r
1155 if (value != _city)
\r
1157 OnCityChanging(value);
\r
1158 SendPropertyChanging();
\r
1160 SendPropertyChanged("City");
\r
1168 #region string Country
\r
1170 private string _country;
\r
1171 [DebuggerNonUserCode]
\r
1172 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1173 public string Country
\r
1181 if (value != _country)
\r
1183 OnCountryChanging(value);
\r
1184 SendPropertyChanging();
\r
1186 SendPropertyChanged("Country");
\r
1187 OnCountryChanged();
\r
1194 #region long EmployeeID
\r
1196 private long _employeeID;
\r
1197 [DebuggerNonUserCode]
\r
1198 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
1199 public long EmployeeID
\r
1203 return _employeeID;
\r
1207 if (value != _employeeID)
\r
1209 OnEmployeeIDChanging(value);
\r
1210 SendPropertyChanging();
\r
1211 _employeeID = value;
\r
1212 SendPropertyChanged("EmployeeID");
\r
1213 OnEmployeeIDChanged();
\r
1220 #region string Extension
\r
1222 private string _extension;
\r
1223 [DebuggerNonUserCode]
\r
1224 [Column(Storage = "_extension", Name = "Extension", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1225 public string Extension
\r
1229 return _extension;
\r
1233 if (value != _extension)
\r
1235 OnExtensionChanging(value);
\r
1236 SendPropertyChanging();
\r
1237 _extension = value;
\r
1238 SendPropertyChanged("Extension");
\r
1239 OnExtensionChanged();
\r
1246 #region string FirstName
\r
1248 private string _firstName;
\r
1249 [DebuggerNonUserCode]
\r
1250 [Column(Storage = "_firstName", Name = "FirstName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
1251 public string FirstName
\r
1255 return _firstName;
\r
1259 if (value != _firstName)
\r
1261 OnFirstNameChanging(value);
\r
1262 SendPropertyChanging();
\r
1263 _firstName = value;
\r
1264 SendPropertyChanged("FirstName");
\r
1265 OnFirstNameChanged();
\r
1272 #region DateTime? HireDate
\r
1274 private DateTime? _hireDate;
\r
1275 [DebuggerNonUserCode]
\r
1276 [Column(Storage = "_hireDate", Name = "HireDate", DbType = "datetime", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1277 public DateTime? HireDate
\r
1285 if (value != _hireDate)
\r
1287 OnHireDateChanging(value);
\r
1288 SendPropertyChanging();
\r
1289 _hireDate = value;
\r
1290 SendPropertyChanged("HireDate");
\r
1291 OnHireDateChanged();
\r
1298 #region string HomePhone
\r
1300 private string _homePhone;
\r
1301 [DebuggerNonUserCode]
\r
1302 [Column(Storage = "_homePhone", Name = "HomePhone", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1303 public string HomePhone
\r
1307 return _homePhone;
\r
1311 if (value != _homePhone)
\r
1313 OnHomePhoneChanging(value);
\r
1314 SendPropertyChanging();
\r
1315 _homePhone = value;
\r
1316 SendPropertyChanged("HomePhone");
\r
1317 OnHomePhoneChanged();
\r
1324 #region string LastName
\r
1326 private string _lastName;
\r
1327 [DebuggerNonUserCode]
\r
1328 [Column(Storage = "_lastName", Name = "LastName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
1329 public string LastName
\r
1337 if (value != _lastName)
\r
1339 OnLastNameChanging(value);
\r
1340 SendPropertyChanging();
\r
1341 _lastName = value;
\r
1342 SendPropertyChanged("LastName");
\r
1343 OnLastNameChanged();
\r
1350 #region string Notes
\r
1352 private string _notes;
\r
1353 [DebuggerNonUserCode]
\r
1354 [Column(Storage = "_notes", Name = "Notes", DbType = "ntext", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1355 public string Notes
\r
1363 if (value != _notes)
\r
1365 OnNotesChanging(value);
\r
1366 SendPropertyChanging();
\r
1368 SendPropertyChanged("Notes");
\r
1376 #region Byte[] Photo
\r
1378 private Byte[] _photo;
\r
1379 [DebuggerNonUserCode]
\r
1380 [Column(Storage = "_photo", Name = "Photo", DbType = "image", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1381 public Byte[] Photo
\r
1389 if (value != _photo)
\r
1391 OnPhotoChanging(value);
\r
1392 SendPropertyChanging();
\r
1394 SendPropertyChanged("Photo");
\r
1402 #region string PhotoPath
\r
1404 private string _photoPath;
\r
1405 [DebuggerNonUserCode]
\r
1406 [Column(Storage = "_photoPath", Name = "PhotoPath", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1407 public string PhotoPath
\r
1411 return _photoPath;
\r
1415 if (value != _photoPath)
\r
1417 OnPhotoPathChanging(value);
\r
1418 SendPropertyChanging();
\r
1419 _photoPath = value;
\r
1420 SendPropertyChanged("PhotoPath");
\r
1421 OnPhotoPathChanged();
\r
1428 #region string PostalCode
\r
1430 private string _postalCode;
\r
1431 [DebuggerNonUserCode]
\r
1432 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1433 public string PostalCode
\r
1437 return _postalCode;
\r
1441 if (value != _postalCode)
\r
1443 OnPostalCodeChanging(value);
\r
1444 SendPropertyChanging();
\r
1445 _postalCode = value;
\r
1446 SendPropertyChanged("PostalCode");
\r
1447 OnPostalCodeChanged();
\r
1454 #region string Region
\r
1456 private string _region;
\r
1457 [DebuggerNonUserCode]
\r
1458 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1459 public string Region
\r
1467 if (value != _region)
\r
1469 OnRegionChanging(value);
\r
1470 SendPropertyChanging();
\r
1472 SendPropertyChanged("Region");
\r
1473 OnRegionChanged();
\r
1480 #region long? ReportsTo
\r
1482 private long? _reportsTo;
\r
1483 [DebuggerNonUserCode]
\r
1484 [Column(Storage = "_reportsTo", Name = "ReportsTo", DbType = "integer", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1485 public long? ReportsTo
\r
1489 return _reportsTo;
\r
1493 if (value != _reportsTo)
\r
1495 if (_reportsToEmployee.HasLoadedOrAssignedValue)
\r
1497 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1499 OnReportsToChanging(value);
\r
1500 SendPropertyChanging();
\r
1501 _reportsTo = value;
\r
1502 SendPropertyChanged("ReportsTo");
\r
1503 OnReportsToChanged();
\r
1510 #region string Title
\r
1512 private string _title;
\r
1513 [DebuggerNonUserCode]
\r
1514 [Column(Storage = "_title", Name = "Title", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1515 public string Title
\r
1523 if (value != _title)
\r
1525 OnTitleChanging(value);
\r
1526 SendPropertyChanging();
\r
1528 SendPropertyChanged("Title");
\r
1536 #region string TitleOfCourtesy
\r
1538 private string _titleOfCourtesy;
\r
1539 [DebuggerNonUserCode]
\r
1540 [Column(Storage = "_titleOfCourtesy", Name = "TitleOfCourtesy", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1541 public string TitleOfCourtesy
\r
1545 return _titleOfCourtesy;
\r
1549 if (value != _titleOfCourtesy)
\r
1551 OnTitleOfCourtesyChanging(value);
\r
1552 SendPropertyChanging();
\r
1553 _titleOfCourtesy = value;
\r
1554 SendPropertyChanged("TitleOfCourtesy");
\r
1555 OnTitleOfCourtesyChanged();
\r
1564 private EntitySet<Employee> _employees;
\r
1565 [Association(Storage = "_employees", OtherKey = "ReportsTo", ThisKey = "EmployeeID", Name = "FK_Employees_0")]
\r
1566 [DebuggerNonUserCode]
\r
1567 public EntitySet<Employee> Employees
\r
1571 return _employees;
\r
1575 _employees = value;
\r
1579 private EntitySet<Order> _orders;
\r
1580 [Association(Storage = "_orders", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "FK_Orders_1")]
\r
1581 [DebuggerNonUserCode]
\r
1582 public EntitySet<Order> Orders
\r
1594 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
1595 [Association(Storage = "_employeeTerritories", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "FK_EmployeeTerritories_1")]
\r
1596 [DebuggerNonUserCode]
\r
1597 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
1601 return _employeeTerritories;
\r
1605 _employeeTerritories = value;
\r
1614 private EntityRef<Employee> _reportsToEmployee;
\r
1615 [Association(Storage = "_reportsToEmployee", OtherKey = "EmployeeID", ThisKey = "ReportsTo", Name = "FK_Employees_0", IsForeignKey = true)]
\r
1616 [DebuggerNonUserCode]
\r
1617 public Employee ReportsToEmployee
\r
1621 return _reportsToEmployee.Entity;
\r
1625 if (value != _reportsToEmployee.Entity)
\r
1627 if (_reportsToEmployee.Entity != null)
\r
1629 var previousEmployee = _reportsToEmployee.Entity;
\r
1630 _reportsToEmployee.Entity = null;
\r
1631 previousEmployee.Employees.Remove(this);
\r
1633 _reportsToEmployee.Entity = value;
\r
1634 if (value != null)
\r
1636 value.Employees.Add(this);
\r
1637 _reportsTo = value.EmployeeID;
\r
1641 _reportsTo = null;
\r
1650 #region Attachement handlers
\r
1652 private void Employees_Attach(Employee entity)
\r
1654 entity.ReportsToEmployee = this;
\r
1657 private void Employees_Detach(Employee entity)
\r
1659 entity.ReportsToEmployee = null;
\r
1662 private void Orders_Attach(Order entity)
\r
1664 entity.Employee = this;
\r
1667 private void Orders_Detach(Order entity)
\r
1669 entity.Employee = null;
\r
1672 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
1674 entity.Employee = this;
\r
1677 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
1679 entity.Employee = null;
\r
1689 _employees = new EntitySet<Employee>(Employees_Attach, Employees_Detach);
\r
1690 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
1691 _employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
\r
1692 _reportsToEmployee = new EntityRef<Employee>();
\r
1700 [Table(Name = "EmployeeTerritories")]
\r
1701 public partial class EmployeeTerritory : INotifyPropertyChanging, INotifyPropertyChanged
\r
1703 #region INotifyPropertyChanging handling
\r
1705 public event PropertyChangingEventHandler PropertyChanging;
\r
1707 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1708 protected virtual void SendPropertyChanging()
\r
1710 if (PropertyChanging != null)
\r
1712 PropertyChanging(this, emptyChangingEventArgs);
\r
1718 #region INotifyPropertyChanged handling
\r
1720 public event PropertyChangedEventHandler PropertyChanged;
\r
1722 protected virtual void SendPropertyChanged(string propertyName)
\r
1724 if (PropertyChanged != null)
\r
1726 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1732 #region Extensibility Method Definitions
\r
1734 partial void OnCreated();
\r
1735 partial void OnEmployeeIDChanged();
\r
1736 partial void OnEmployeeIDChanging(long value);
\r
1737 partial void OnTerritoryIDChanged();
\r
1738 partial void OnTerritoryIDChanging(string value);
\r
1742 #region long EmployeeID
\r
1744 private long _employeeID;
\r
1745 [DebuggerNonUserCode]
\r
1746 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
1747 public long EmployeeID
\r
1751 return _employeeID;
\r
1755 if (value != _employeeID)
\r
1757 if (_employee.HasLoadedOrAssignedValue)
\r
1759 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1761 OnEmployeeIDChanging(value);
\r
1762 SendPropertyChanging();
\r
1763 _employeeID = value;
\r
1764 SendPropertyChanged("EmployeeID");
\r
1765 OnEmployeeIDChanged();
\r
1772 #region string TerritoryID
\r
1774 private string _territoryID;
\r
1775 [DebuggerNonUserCode]
\r
1776 [Column(Storage = "_territoryID", Name = "TerritoryID", DbType = "nvarchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
1777 public string TerritoryID
\r
1781 return _territoryID;
\r
1785 if (value != _territoryID)
\r
1787 if (_territory.HasLoadedOrAssignedValue)
\r
1789 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1791 OnTerritoryIDChanging(value);
\r
1792 SendPropertyChanging();
\r
1793 _territoryID = value;
\r
1794 SendPropertyChanged("TerritoryID");
\r
1795 OnTerritoryIDChanged();
\r
1804 private EntityRef<Territory> _territory;
\r
1805 [Association(Storage = "_territory", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "FK_EmployeeTerritories_0", IsForeignKey = true)]
\r
1806 [DebuggerNonUserCode]
\r
1807 public Territory Territory
\r
1811 return _territory.Entity;
\r
1815 if (value != _territory.Entity)
\r
1817 if (_territory.Entity != null)
\r
1819 var previousTerritory = _territory.Entity;
\r
1820 _territory.Entity = null;
\r
1821 previousTerritory.EmployeeTerritories.Remove(this);
\r
1823 _territory.Entity = value;
\r
1824 if (value != null)
\r
1826 value.EmployeeTerritories.Add(this);
\r
1827 _territoryID = value.TerritoryID;
\r
1831 _territoryID = default(string);
\r
1837 private EntityRef<Employee> _employee;
\r
1838 [Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "FK_EmployeeTerritories_1", IsForeignKey = true)]
\r
1839 [DebuggerNonUserCode]
\r
1840 public Employee Employee
\r
1844 return _employee.Entity;
\r
1848 if (value != _employee.Entity)
\r
1850 if (_employee.Entity != null)
\r
1852 var previousEmployee = _employee.Entity;
\r
1853 _employee.Entity = null;
\r
1854 previousEmployee.EmployeeTerritories.Remove(this);
\r
1856 _employee.Entity = value;
\r
1857 if (value != null)
\r
1859 value.EmployeeTerritories.Add(this);
\r
1860 _employeeID = value.EmployeeID;
\r
1864 _employeeID = default(long);
\r
1875 public EmployeeTerritory()
\r
1877 _territory = new EntityRef<Territory>();
\r
1878 _employee = new EntityRef<Employee>();
\r
1886 [Table(Name = "Orders")]
\r
1887 public partial class Order : INotifyPropertyChanging, INotifyPropertyChanged
\r
1889 #region INotifyPropertyChanging handling
\r
1891 public event PropertyChangingEventHandler PropertyChanging;
\r
1893 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1894 protected virtual void SendPropertyChanging()
\r
1896 if (PropertyChanging != null)
\r
1898 PropertyChanging(this, emptyChangingEventArgs);
\r
1904 #region INotifyPropertyChanged handling
\r
1906 public event PropertyChangedEventHandler PropertyChanged;
\r
1908 protected virtual void SendPropertyChanged(string propertyName)
\r
1910 if (PropertyChanged != null)
\r
1912 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1918 #region Extensibility Method Definitions
\r
1920 partial void OnCreated();
\r
1921 partial void OnCustomerIDChanged();
\r
1922 partial void OnCustomerIDChanging(string value);
\r
1923 partial void OnEmployeeIDChanged();
\r
1924 partial void OnEmployeeIDChanging(long? value);
\r
1925 partial void OnFreightChanged();
\r
1926 partial void OnFreightChanging(decimal? value);
\r
1927 partial void OnOrderDateChanged();
\r
1928 partial void OnOrderDateChanging(DateTime? value);
\r
1929 partial void OnOrderIDChanged();
\r
1930 partial void OnOrderIDChanging(long value);
\r
1931 partial void OnRequiredDateChanged();
\r
1932 partial void OnRequiredDateChanging(DateTime? value);
\r
1933 partial void OnShipAddressChanged();
\r
1934 partial void OnShipAddressChanging(string value);
\r
1935 partial void OnShipCityChanged();
\r
1936 partial void OnShipCityChanging(string value);
\r
1937 partial void OnShipCountryChanged();
\r
1938 partial void OnShipCountryChanging(string value);
\r
1939 partial void OnShipNameChanged();
\r
1940 partial void OnShipNameChanging(string value);
\r
1941 partial void OnShippedDateChanged();
\r
1942 partial void OnShippedDateChanging(DateTime? value);
\r
1943 partial void OnShipPostalCodeChanged();
\r
1944 partial void OnShipPostalCodeChanging(string value);
\r
1945 partial void OnShipRegionChanged();
\r
1946 partial void OnShipRegionChanging(string value);
\r
1947 partial void OnShipViaChanged();
\r
1948 partial void OnShipViaChanging(long? value);
\r
1952 #region string CustomerID
\r
1954 private string _customerID;
\r
1955 [DebuggerNonUserCode]
\r
1956 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1957 public string CustomerID
\r
1961 return _customerID;
\r
1965 if (value != _customerID)
\r
1967 if (_customer.HasLoadedOrAssignedValue)
\r
1969 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1971 OnCustomerIDChanging(value);
\r
1972 SendPropertyChanging();
\r
1973 _customerID = value;
\r
1974 SendPropertyChanged("CustomerID");
\r
1975 OnCustomerIDChanged();
\r
1982 #region long? EmployeeID
\r
1984 private long? _employeeID;
\r
1985 [DebuggerNonUserCode]
\r
1986 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "integer", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
1987 public long? EmployeeID
\r
1991 return _employeeID;
\r
1995 if (value != _employeeID)
\r
1997 if (_employee.HasLoadedOrAssignedValue)
\r
1999 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2001 OnEmployeeIDChanging(value);
\r
2002 SendPropertyChanging();
\r
2003 _employeeID = value;
\r
2004 SendPropertyChanged("EmployeeID");
\r
2005 OnEmployeeIDChanged();
\r
2012 #region decimal? Freight
\r
2014 private decimal? _freight;
\r
2015 [DebuggerNonUserCode]
\r
2016 [Column(Storage = "_freight", Name = "Freight", DbType = "money", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2017 public decimal? Freight
\r
2025 if (value != _freight)
\r
2027 OnFreightChanging(value);
\r
2028 SendPropertyChanging();
\r
2030 SendPropertyChanged("Freight");
\r
2031 OnFreightChanged();
\r
2038 #region DateTime? OrderDate
\r
2040 private DateTime? _orderDate;
\r
2041 [DebuggerNonUserCode]
\r
2042 [Column(Storage = "_orderDate", Name = "OrderDate", DbType = "datetime", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2043 public DateTime? OrderDate
\r
2047 return _orderDate;
\r
2051 if (value != _orderDate)
\r
2053 OnOrderDateChanging(value);
\r
2054 SendPropertyChanging();
\r
2055 _orderDate = value;
\r
2056 SendPropertyChanged("OrderDate");
\r
2057 OnOrderDateChanged();
\r
2064 #region long OrderID
\r
2066 private long _orderID;
\r
2067 [DebuggerNonUserCode]
\r
2068 [Column(Storage = "_orderID", Name = "OrderID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
2069 public long OrderID
\r
2077 if (value != _orderID)
\r
2079 OnOrderIDChanging(value);
\r
2080 SendPropertyChanging();
\r
2082 SendPropertyChanged("OrderID");
\r
2083 OnOrderIDChanged();
\r
2090 #region DateTime? RequiredDate
\r
2092 private DateTime? _requiredDate;
\r
2093 [DebuggerNonUserCode]
\r
2094 [Column(Storage = "_requiredDate", Name = "RequiredDate", DbType = "datetime", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2095 public DateTime? RequiredDate
\r
2099 return _requiredDate;
\r
2103 if (value != _requiredDate)
\r
2105 OnRequiredDateChanging(value);
\r
2106 SendPropertyChanging();
\r
2107 _requiredDate = value;
\r
2108 SendPropertyChanged("RequiredDate");
\r
2109 OnRequiredDateChanged();
\r
2116 #region string ShipAddress
\r
2118 private string _shipAddress;
\r
2119 [DebuggerNonUserCode]
\r
2120 [Column(Storage = "_shipAddress", Name = "ShipAddress", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2121 public string ShipAddress
\r
2125 return _shipAddress;
\r
2129 if (value != _shipAddress)
\r
2131 OnShipAddressChanging(value);
\r
2132 SendPropertyChanging();
\r
2133 _shipAddress = value;
\r
2134 SendPropertyChanged("ShipAddress");
\r
2135 OnShipAddressChanged();
\r
2142 #region string ShipCity
\r
2144 private string _shipCity;
\r
2145 [DebuggerNonUserCode]
\r
2146 [Column(Storage = "_shipCity", Name = "ShipCity", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2147 public string ShipCity
\r
2155 if (value != _shipCity)
\r
2157 OnShipCityChanging(value);
\r
2158 SendPropertyChanging();
\r
2159 _shipCity = value;
\r
2160 SendPropertyChanged("ShipCity");
\r
2161 OnShipCityChanged();
\r
2168 #region string ShipCountry
\r
2170 private string _shipCountry;
\r
2171 [DebuggerNonUserCode]
\r
2172 [Column(Storage = "_shipCountry", Name = "ShipCountry", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2173 public string ShipCountry
\r
2177 return _shipCountry;
\r
2181 if (value != _shipCountry)
\r
2183 OnShipCountryChanging(value);
\r
2184 SendPropertyChanging();
\r
2185 _shipCountry = value;
\r
2186 SendPropertyChanged("ShipCountry");
\r
2187 OnShipCountryChanged();
\r
2194 #region string ShipName
\r
2196 private string _shipName;
\r
2197 [DebuggerNonUserCode]
\r
2198 [Column(Storage = "_shipName", Name = "ShipName", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2199 public string ShipName
\r
2207 if (value != _shipName)
\r
2209 OnShipNameChanging(value);
\r
2210 SendPropertyChanging();
\r
2211 _shipName = value;
\r
2212 SendPropertyChanged("ShipName");
\r
2213 OnShipNameChanged();
\r
2220 #region DateTime? ShippedDate
\r
2222 private DateTime? _shippedDate;
\r
2223 [DebuggerNonUserCode]
\r
2224 [Column(Storage = "_shippedDate", Name = "ShippedDate", DbType = "datetime", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2225 public DateTime? ShippedDate
\r
2229 return _shippedDate;
\r
2233 if (value != _shippedDate)
\r
2235 OnShippedDateChanging(value);
\r
2236 SendPropertyChanging();
\r
2237 _shippedDate = value;
\r
2238 SendPropertyChanged("ShippedDate");
\r
2239 OnShippedDateChanged();
\r
2246 #region string ShipPostalCode
\r
2248 private string _shipPostalCode;
\r
2249 [DebuggerNonUserCode]
\r
2250 [Column(Storage = "_shipPostalCode", Name = "ShipPostalCode", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2251 public string ShipPostalCode
\r
2255 return _shipPostalCode;
\r
2259 if (value != _shipPostalCode)
\r
2261 OnShipPostalCodeChanging(value);
\r
2262 SendPropertyChanging();
\r
2263 _shipPostalCode = value;
\r
2264 SendPropertyChanged("ShipPostalCode");
\r
2265 OnShipPostalCodeChanged();
\r
2272 #region string ShipRegion
\r
2274 private string _shipRegion;
\r
2275 [DebuggerNonUserCode]
\r
2276 [Column(Storage = "_shipRegion", Name = "ShipRegion", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2277 public string ShipRegion
\r
2281 return _shipRegion;
\r
2285 if (value != _shipRegion)
\r
2287 OnShipRegionChanging(value);
\r
2288 SendPropertyChanging();
\r
2289 _shipRegion = value;
\r
2290 SendPropertyChanged("ShipRegion");
\r
2291 OnShipRegionChanged();
\r
2298 #region long? ShipVia
\r
2300 private long? _shipVia;
\r
2301 [DebuggerNonUserCode]
\r
2302 [Column(Storage = "_shipVia", Name = "ShipVia", DbType = "integer", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2303 public long? ShipVia
\r
2311 if (value != _shipVia)
\r
2313 if (_shipper.HasLoadedOrAssignedValue)
\r
2315 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2317 OnShipViaChanging(value);
\r
2318 SendPropertyChanging();
\r
2320 SendPropertyChanged("ShipVia");
\r
2321 OnShipViaChanged();
\r
2330 private EntitySet<OrderDetail> _orderDetails;
\r
2331 [Association(Storage = "_orderDetails", OtherKey = "OrderID", ThisKey = "OrderID", Name = "\"FK_Order Details_1\"")]
\r
2332 [DebuggerNonUserCode]
\r
2333 public EntitySet<OrderDetail> OrderDetails
\r
2337 return _orderDetails;
\r
2341 _orderDetails = value;
\r
2350 private EntityRef<Shipper> _shipper;
\r
2351 [Association(Storage = "_shipper", OtherKey = "ShipperID", ThisKey = "ShipVia", Name = "FK_Orders_0", IsForeignKey = true)]
\r
2352 [DebuggerNonUserCode]
\r
2353 public Shipper Shipper
\r
2357 return _shipper.Entity;
\r
2361 if (value != _shipper.Entity)
\r
2363 if (_shipper.Entity != null)
\r
2365 var previousShipper = _shipper.Entity;
\r
2366 _shipper.Entity = null;
\r
2367 previousShipper.Orders.Remove(this);
\r
2369 _shipper.Entity = value;
\r
2370 if (value != null)
\r
2372 value.Orders.Add(this);
\r
2373 _shipVia = value.ShipperID;
\r
2383 private EntityRef<Employee> _employee;
\r
2384 [Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "FK_Orders_1", IsForeignKey = true)]
\r
2385 [DebuggerNonUserCode]
\r
2386 public Employee Employee
\r
2390 return _employee.Entity;
\r
2394 if (value != _employee.Entity)
\r
2396 if (_employee.Entity != null)
\r
2398 var previousEmployee = _employee.Entity;
\r
2399 _employee.Entity = null;
\r
2400 previousEmployee.Orders.Remove(this);
\r
2402 _employee.Entity = value;
\r
2403 if (value != null)
\r
2405 value.Orders.Add(this);
\r
2406 _employeeID = value.EmployeeID;
\r
2410 _employeeID = null;
\r
2416 private EntityRef<Customer> _customer;
\r
2417 [Association(Storage = "_customer", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "FK_Orders_2", IsForeignKey = true)]
\r
2418 [DebuggerNonUserCode]
\r
2419 public Customer Customer
\r
2423 return _customer.Entity;
\r
2427 if (value != _customer.Entity)
\r
2429 if (_customer.Entity != null)
\r
2431 var previousCustomer = _customer.Entity;
\r
2432 _customer.Entity = null;
\r
2433 previousCustomer.Orders.Remove(this);
\r
2435 _customer.Entity = value;
\r
2436 if (value != null)
\r
2438 value.Orders.Add(this);
\r
2439 _customerID = value.CustomerID;
\r
2443 _customerID = null;
\r
2452 #region Attachement handlers
\r
2454 private void OrderDetails_Attach(OrderDetail entity)
\r
2456 entity.Order = this;
\r
2459 private void OrderDetails_Detach(OrderDetail entity)
\r
2461 entity.Order = null;
\r
2471 _orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
\r
2472 _shipper = new EntityRef<Shipper>();
\r
2473 _employee = new EntityRef<Employee>();
\r
2474 _customer = new EntityRef<Customer>();
\r
2482 [Table(Name = "\"Order Details\"")]
\r
2483 public partial class OrderDetail : INotifyPropertyChanging, INotifyPropertyChanged
\r
2485 #region INotifyPropertyChanging handling
\r
2487 public event PropertyChangingEventHandler PropertyChanging;
\r
2489 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
2490 protected virtual void SendPropertyChanging()
\r
2492 if (PropertyChanging != null)
\r
2494 PropertyChanging(this, emptyChangingEventArgs);
\r
2500 #region INotifyPropertyChanged handling
\r
2502 public event PropertyChangedEventHandler PropertyChanged;
\r
2504 protected virtual void SendPropertyChanged(string propertyName)
\r
2506 if (PropertyChanged != null)
\r
2508 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
2514 #region Extensibility Method Definitions
\r
2516 partial void OnCreated();
\r
2517 partial void OnDiscountChanged();
\r
2518 partial void OnDiscountChanging(float value);
\r
2519 partial void OnOrderIDChanged();
\r
2520 partial void OnOrderIDChanging(long value);
\r
2521 partial void OnProductIDChanged();
\r
2522 partial void OnProductIDChanging(long value);
\r
2523 partial void OnQuantityChanged();
\r
2524 partial void OnQuantityChanging(short value);
\r
2525 partial void OnUnitPriceChanged();
\r
2526 partial void OnUnitPriceChanging(decimal value);
\r
2530 #region float Discount
\r
2532 private float _discount;
\r
2533 [DebuggerNonUserCode]
\r
2534 [Column(Storage = "_discount", Name = "Discount", DbType = "real", AutoSync = AutoSync.Never)]
\r
2535 public float Discount
\r
2543 if (value != _discount)
\r
2545 OnDiscountChanging(value);
\r
2546 SendPropertyChanging();
\r
2547 _discount = value;
\r
2548 SendPropertyChanged("Discount");
\r
2549 OnDiscountChanged();
\r
2556 #region long OrderID
\r
2558 private long _orderID;
\r
2559 [DebuggerNonUserCode]
\r
2560 [Column(Storage = "_orderID", Name = "OrderID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
2561 public long OrderID
\r
2569 if (value != _orderID)
\r
2571 if (_order.HasLoadedOrAssignedValue)
\r
2573 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2575 OnOrderIDChanging(value);
\r
2576 SendPropertyChanging();
\r
2578 SendPropertyChanged("OrderID");
\r
2579 OnOrderIDChanged();
\r
2586 #region long ProductID
\r
2588 private long _productID;
\r
2589 [DebuggerNonUserCode]
\r
2590 [Column(Storage = "_productID", Name = "ProductID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
2591 public long ProductID
\r
2595 return _productID;
\r
2599 if (value != _productID)
\r
2601 if (_product.HasLoadedOrAssignedValue)
\r
2603 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2605 OnProductIDChanging(value);
\r
2606 SendPropertyChanging();
\r
2607 _productID = value;
\r
2608 SendPropertyChanged("ProductID");
\r
2609 OnProductIDChanged();
\r
2616 #region short Quantity
\r
2618 private short _quantity;
\r
2619 [DebuggerNonUserCode]
\r
2620 [Column(Storage = "_quantity", Name = "Quantity", DbType = "smallint", AutoSync = AutoSync.Never)]
\r
2621 public short Quantity
\r
2629 if (value != _quantity)
\r
2631 OnQuantityChanging(value);
\r
2632 SendPropertyChanging();
\r
2633 _quantity = value;
\r
2634 SendPropertyChanged("Quantity");
\r
2635 OnQuantityChanged();
\r
2642 #region decimal UnitPrice
\r
2644 private decimal _unitPrice;
\r
2645 [DebuggerNonUserCode]
\r
2646 [Column(Storage = "_unitPrice", Name = "UnitPrice", DbType = "money", AutoSync = AutoSync.Never)]
\r
2647 public decimal UnitPrice
\r
2651 return _unitPrice;
\r
2655 if (value != _unitPrice)
\r
2657 OnUnitPriceChanging(value);
\r
2658 SendPropertyChanging();
\r
2659 _unitPrice = value;
\r
2660 SendPropertyChanged("UnitPrice");
\r
2661 OnUnitPriceChanged();
\r
2670 private EntityRef<Product> _product;
\r
2671 [Association(Storage = "_product", OtherKey = "ProductID", ThisKey = "ProductID", Name = "\"FK_Order Details_0\"", IsForeignKey = true)]
\r
2672 [DebuggerNonUserCode]
\r
2673 public Product Product
\r
2677 return _product.Entity;
\r
2681 if (value != _product.Entity)
\r
2683 if (_product.Entity != null)
\r
2685 var previousProduct = _product.Entity;
\r
2686 _product.Entity = null;
\r
2687 previousProduct.OrderDetails.Remove(this);
\r
2689 _product.Entity = value;
\r
2690 if (value != null)
\r
2692 value.OrderDetails.Add(this);
\r
2693 _productID = value.ProductID;
\r
2697 _productID = default(long);
\r
2703 private EntityRef<Order> _order;
\r
2704 [Association(Storage = "_order", OtherKey = "OrderID", ThisKey = "OrderID", Name = "\"FK_Order Details_1\"", IsForeignKey = true)]
\r
2705 [DebuggerNonUserCode]
\r
2706 public Order Order
\r
2710 return _order.Entity;
\r
2714 if (value != _order.Entity)
\r
2716 if (_order.Entity != null)
\r
2718 var previousOrder = _order.Entity;
\r
2719 _order.Entity = null;
\r
2720 previousOrder.OrderDetails.Remove(this);
\r
2722 _order.Entity = value;
\r
2723 if (value != null)
\r
2725 value.OrderDetails.Add(this);
\r
2726 _orderID = value.OrderID;
\r
2730 _orderID = default(long);
\r
2741 public OrderDetail()
\r
2743 _product = new EntityRef<Product>();
\r
2744 _order = new EntityRef<Order>();
\r
2752 [Table(Name = "Products")]
\r
2753 public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged
\r
2755 #region INotifyPropertyChanging handling
\r
2757 public event PropertyChangingEventHandler PropertyChanging;
\r
2759 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
2760 protected virtual void SendPropertyChanging()
\r
2762 if (PropertyChanging != null)
\r
2764 PropertyChanging(this, emptyChangingEventArgs);
\r
2770 #region INotifyPropertyChanged handling
\r
2772 public event PropertyChangedEventHandler PropertyChanged;
\r
2774 protected virtual void SendPropertyChanged(string propertyName)
\r
2776 if (PropertyChanged != null)
\r
2778 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
2784 #region Extensibility Method Definitions
\r
2786 partial void OnCreated();
\r
2787 partial void OnCategoryIDChanged();
\r
2788 partial void OnCategoryIDChanging(long? value);
\r
2789 partial void OnDiscontinuedChanged();
\r
2790 partial void OnDiscontinuedChanging(bool value);
\r
2791 partial void OnProductIDChanged();
\r
2792 partial void OnProductIDChanging(long value);
\r
2793 partial void OnProductNameChanged();
\r
2794 partial void OnProductNameChanging(string value);
\r
2795 partial void OnQuantityPerUnitChanged();
\r
2796 partial void OnQuantityPerUnitChanging(string value);
\r
2797 partial void OnReorderLevelChanged();
\r
2798 partial void OnReorderLevelChanging(short? value);
\r
2799 partial void OnSupplierIDChanged();
\r
2800 partial void OnSupplierIDChanging(long? value);
\r
2801 partial void OnUnitPriceChanged();
\r
2802 partial void OnUnitPriceChanging(decimal? value);
\r
2803 partial void OnUnitsInStockChanged();
\r
2804 partial void OnUnitsInStockChanging(short? value);
\r
2805 partial void OnUnitsOnOrderChanged();
\r
2806 partial void OnUnitsOnOrderChanging(short? value);
\r
2810 #region long? CategoryID
\r
2812 private long? _categoryID;
\r
2813 [DebuggerNonUserCode]
\r
2814 [Column(Storage = "_categoryID", Name = "CategoryID", DbType = "integer", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2815 public long? CategoryID
\r
2819 return _categoryID;
\r
2823 if (value != _categoryID)
\r
2825 if (_category.HasLoadedOrAssignedValue)
\r
2827 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2829 OnCategoryIDChanging(value);
\r
2830 SendPropertyChanging();
\r
2831 _categoryID = value;
\r
2832 SendPropertyChanged("CategoryID");
\r
2833 OnCategoryIDChanged();
\r
2840 #region bool Discontinued
\r
2842 private bool _discontinued;
\r
2843 [DebuggerNonUserCode]
\r
2844 [Column(Storage = "_discontinued", Name = "Discontinued", DbType = "bit", AutoSync = AutoSync.Never)]
\r
2845 public bool Discontinued
\r
2849 return _discontinued;
\r
2853 if (value != _discontinued)
\r
2855 OnDiscontinuedChanging(value);
\r
2856 SendPropertyChanging();
\r
2857 _discontinued = value;
\r
2858 SendPropertyChanged("Discontinued");
\r
2859 OnDiscontinuedChanged();
\r
2866 #region long ProductID
\r
2868 private long _productID;
\r
2869 [DebuggerNonUserCode]
\r
2870 [Column(Storage = "_productID", Name = "ProductID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
2871 public long ProductID
\r
2875 return _productID;
\r
2879 if (value != _productID)
\r
2881 OnProductIDChanging(value);
\r
2882 SendPropertyChanging();
\r
2883 _productID = value;
\r
2884 SendPropertyChanged("ProductID");
\r
2885 OnProductIDChanged();
\r
2892 #region string ProductName
\r
2894 private string _productName;
\r
2895 [DebuggerNonUserCode]
\r
2896 [Column(Storage = "_productName", Name = "ProductName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
2897 public string ProductName
\r
2901 return _productName;
\r
2905 if (value != _productName)
\r
2907 OnProductNameChanging(value);
\r
2908 SendPropertyChanging();
\r
2909 _productName = value;
\r
2910 SendPropertyChanged("ProductName");
\r
2911 OnProductNameChanged();
\r
2918 #region string QuantityPerUnit
\r
2920 private string _quantityPerUnit;
\r
2921 [DebuggerNonUserCode]
\r
2922 [Column(Storage = "_quantityPerUnit", Name = "QuantityPerUnit", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2923 public string QuantityPerUnit
\r
2927 return _quantityPerUnit;
\r
2931 if (value != _quantityPerUnit)
\r
2933 OnQuantityPerUnitChanging(value);
\r
2934 SendPropertyChanging();
\r
2935 _quantityPerUnit = value;
\r
2936 SendPropertyChanged("QuantityPerUnit");
\r
2937 OnQuantityPerUnitChanged();
\r
2944 #region short? ReorderLevel
\r
2946 private short? _reorderLevel;
\r
2947 [DebuggerNonUserCode]
\r
2948 [Column(Storage = "_reorderLevel", Name = "ReorderLevel", DbType = "smallint", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2949 public short? ReorderLevel
\r
2953 return _reorderLevel;
\r
2957 if (value != _reorderLevel)
\r
2959 OnReorderLevelChanging(value);
\r
2960 SendPropertyChanging();
\r
2961 _reorderLevel = value;
\r
2962 SendPropertyChanged("ReorderLevel");
\r
2963 OnReorderLevelChanged();
\r
2970 #region long? SupplierID
\r
2972 private long? _supplierID;
\r
2973 [DebuggerNonUserCode]
\r
2974 [Column(Storage = "_supplierID", Name = "SupplierID", DbType = "integer", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
2975 public long? SupplierID
\r
2979 return _supplierID;
\r
2983 if (value != _supplierID)
\r
2985 if (_supplier.HasLoadedOrAssignedValue)
\r
2987 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2989 OnSupplierIDChanging(value);
\r
2990 SendPropertyChanging();
\r
2991 _supplierID = value;
\r
2992 SendPropertyChanged("SupplierID");
\r
2993 OnSupplierIDChanged();
\r
3000 #region decimal? UnitPrice
\r
3002 private decimal? _unitPrice;
\r
3003 [DebuggerNonUserCode]
\r
3004 [Column(Storage = "_unitPrice", Name = "UnitPrice", DbType = "money", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3005 public decimal? UnitPrice
\r
3009 return _unitPrice;
\r
3013 if (value != _unitPrice)
\r
3015 OnUnitPriceChanging(value);
\r
3016 SendPropertyChanging();
\r
3017 _unitPrice = value;
\r
3018 SendPropertyChanged("UnitPrice");
\r
3019 OnUnitPriceChanged();
\r
3026 #region short? UnitsInStock
\r
3028 private short? _unitsInStock;
\r
3029 [DebuggerNonUserCode]
\r
3030 [Column(Storage = "_unitsInStock", Name = "UnitsInStock", DbType = "smallint", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3031 public short? UnitsInStock
\r
3035 return _unitsInStock;
\r
3039 if (value != _unitsInStock)
\r
3041 OnUnitsInStockChanging(value);
\r
3042 SendPropertyChanging();
\r
3043 _unitsInStock = value;
\r
3044 SendPropertyChanged("UnitsInStock");
\r
3045 OnUnitsInStockChanged();
\r
3052 #region short? UnitsOnOrder
\r
3054 private short? _unitsOnOrder;
\r
3055 [DebuggerNonUserCode]
\r
3056 [Column(Storage = "_unitsOnOrder", Name = "UnitsOnOrder", DbType = "smallint", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3057 public short? UnitsOnOrder
\r
3061 return _unitsOnOrder;
\r
3065 if (value != _unitsOnOrder)
\r
3067 OnUnitsOnOrderChanging(value);
\r
3068 SendPropertyChanging();
\r
3069 _unitsOnOrder = value;
\r
3070 SendPropertyChanged("UnitsOnOrder");
\r
3071 OnUnitsOnOrderChanged();
\r
3080 private EntitySet<OrderDetail> _orderDetails;
\r
3081 [Association(Storage = "_orderDetails", OtherKey = "ProductID", ThisKey = "ProductID", Name = "\"FK_Order Details_0\"")]
\r
3082 [DebuggerNonUserCode]
\r
3083 public EntitySet<OrderDetail> OrderDetails
\r
3087 return _orderDetails;
\r
3091 _orderDetails = value;
\r
3100 private EntityRef<Supplier> _supplier;
\r
3101 [Association(Storage = "_supplier", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "FK_Products_0", IsForeignKey = true)]
\r
3102 [DebuggerNonUserCode]
\r
3103 public Supplier Supplier
\r
3107 return _supplier.Entity;
\r
3111 if (value != _supplier.Entity)
\r
3113 if (_supplier.Entity != null)
\r
3115 var previousSupplier = _supplier.Entity;
\r
3116 _supplier.Entity = null;
\r
3117 previousSupplier.Products.Remove(this);
\r
3119 _supplier.Entity = value;
\r
3120 if (value != null)
\r
3122 value.Products.Add(this);
\r
3123 _supplierID = value.SupplierID;
\r
3127 _supplierID = null;
\r
3133 private EntityRef<Category> _category;
\r
3134 [Association(Storage = "_category", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "FK_Products_1", IsForeignKey = true)]
\r
3135 [DebuggerNonUserCode]
\r
3136 public Category Category
\r
3140 return _category.Entity;
\r
3144 if (value != _category.Entity)
\r
3146 if (_category.Entity != null)
\r
3148 var previousCategory = _category.Entity;
\r
3149 _category.Entity = null;
\r
3150 previousCategory.Products.Remove(this);
\r
3152 _category.Entity = value;
\r
3153 if (value != null)
\r
3155 value.Products.Add(this);
\r
3156 _categoryID = value.CategoryID;
\r
3160 _categoryID = null;
\r
3169 #region Attachement handlers
\r
3171 private void OrderDetails_Attach(OrderDetail entity)
\r
3173 entity.Product = this;
\r
3176 private void OrderDetails_Detach(OrderDetail entity)
\r
3178 entity.Product = null;
\r
3188 _orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
\r
3189 _supplier = new EntityRef<Supplier>();
\r
3190 _category = new EntityRef<Category>();
\r
3198 [Table(Name = "Region")]
\r
3199 public partial class Region : INotifyPropertyChanging, INotifyPropertyChanged
\r
3201 #region INotifyPropertyChanging handling
\r
3203 public event PropertyChangingEventHandler PropertyChanging;
\r
3205 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3206 protected virtual void SendPropertyChanging()
\r
3208 if (PropertyChanging != null)
\r
3210 PropertyChanging(this, emptyChangingEventArgs);
\r
3216 #region INotifyPropertyChanged handling
\r
3218 public event PropertyChangedEventHandler PropertyChanged;
\r
3220 protected virtual void SendPropertyChanged(string propertyName)
\r
3222 if (PropertyChanged != null)
\r
3224 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3230 #region Extensibility Method Definitions
\r
3232 partial void OnCreated();
\r
3233 partial void OnRegionDescriptionChanged();
\r
3234 partial void OnRegionDescriptionChanging(string value);
\r
3235 partial void OnRegionIDChanged();
\r
3236 partial void OnRegionIDChanging(long value);
\r
3240 #region string RegionDescription
\r
3242 private string _regionDescription;
\r
3243 [DebuggerNonUserCode]
\r
3244 [Column(Storage = "_regionDescription", Name = "RegionDescription", DbType = "nchar", AutoSync = AutoSync.Never)]
\r
3245 public string RegionDescription
\r
3249 return _regionDescription;
\r
3253 if (value != _regionDescription)
\r
3255 OnRegionDescriptionChanging(value);
\r
3256 SendPropertyChanging();
\r
3257 _regionDescription = value;
\r
3258 SendPropertyChanged("RegionDescription");
\r
3259 OnRegionDescriptionChanged();
\r
3266 #region long RegionID
\r
3268 private long _regionID;
\r
3269 [DebuggerNonUserCode]
\r
3270 [Column(Storage = "_regionID", Name = "RegionID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
3271 public long RegionID
\r
3279 if (value != _regionID)
\r
3281 OnRegionIDChanging(value);
\r
3282 SendPropertyChanging();
\r
3283 _regionID = value;
\r
3284 SendPropertyChanged("RegionID");
\r
3285 OnRegionIDChanged();
\r
3294 private EntitySet<Territory> _territories;
\r
3295 [Association(Storage = "_territories", OtherKey = "RegionID", ThisKey = "RegionID", Name = "FK_Territories_0")]
\r
3296 [DebuggerNonUserCode]
\r
3297 public EntitySet<Territory> Territories
\r
3301 return _territories;
\r
3305 _territories = value;
\r
3312 #region Attachement handlers
\r
3314 private void Territories_Attach(Territory entity)
\r
3316 entity.Region = this;
\r
3319 private void Territories_Detach(Territory entity)
\r
3321 entity.Region = null;
\r
3331 _territories = new EntitySet<Territory>(Territories_Attach, Territories_Detach);
\r
3339 [Table(Name = "Shippers")]
\r
3340 public partial class Shipper : INotifyPropertyChanging, INotifyPropertyChanged
\r
3342 #region INotifyPropertyChanging handling
\r
3344 public event PropertyChangingEventHandler PropertyChanging;
\r
3346 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3347 protected virtual void SendPropertyChanging()
\r
3349 if (PropertyChanging != null)
\r
3351 PropertyChanging(this, emptyChangingEventArgs);
\r
3357 #region INotifyPropertyChanged handling
\r
3359 public event PropertyChangedEventHandler PropertyChanged;
\r
3361 protected virtual void SendPropertyChanged(string propertyName)
\r
3363 if (PropertyChanged != null)
\r
3365 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3371 #region Extensibility Method Definitions
\r
3373 partial void OnCreated();
\r
3374 partial void OnCompanyNameChanged();
\r
3375 partial void OnCompanyNameChanging(string value);
\r
3376 partial void OnPhoneChanged();
\r
3377 partial void OnPhoneChanging(string value);
\r
3378 partial void OnShipperIDChanged();
\r
3379 partial void OnShipperIDChanging(long value);
\r
3383 #region string CompanyName
\r
3385 private string _companyName;
\r
3386 [DebuggerNonUserCode]
\r
3387 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
3388 public string CompanyName
\r
3392 return _companyName;
\r
3396 if (value != _companyName)
\r
3398 OnCompanyNameChanging(value);
\r
3399 SendPropertyChanging();
\r
3400 _companyName = value;
\r
3401 SendPropertyChanged("CompanyName");
\r
3402 OnCompanyNameChanged();
\r
3409 #region string Phone
\r
3411 private string _phone;
\r
3412 [DebuggerNonUserCode]
\r
3413 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3414 public string Phone
\r
3422 if (value != _phone)
\r
3424 OnPhoneChanging(value);
\r
3425 SendPropertyChanging();
\r
3427 SendPropertyChanged("Phone");
\r
3435 #region long ShipperID
\r
3437 private long _shipperID;
\r
3438 [DebuggerNonUserCode]
\r
3439 [Column(Storage = "_shipperID", Name = "ShipperID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
3440 public long ShipperID
\r
3444 return _shipperID;
\r
3448 if (value != _shipperID)
\r
3450 OnShipperIDChanging(value);
\r
3451 SendPropertyChanging();
\r
3452 _shipperID = value;
\r
3453 SendPropertyChanged("ShipperID");
\r
3454 OnShipperIDChanged();
\r
3463 private EntitySet<Order> _orders;
\r
3464 [Association(Storage = "_orders", OtherKey = "ShipVia", ThisKey = "ShipperID", Name = "FK_Orders_0")]
\r
3465 [DebuggerNonUserCode]
\r
3466 public EntitySet<Order> Orders
\r
3481 #region Attachement handlers
\r
3483 private void Orders_Attach(Order entity)
\r
3485 entity.Shipper = this;
\r
3488 private void Orders_Detach(Order entity)
\r
3490 entity.Shipper = null;
\r
3500 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
3508 [Table(Name = "Suppliers")]
\r
3509 public partial class Supplier : INotifyPropertyChanging, INotifyPropertyChanged
\r
3511 #region INotifyPropertyChanging handling
\r
3513 public event PropertyChangingEventHandler PropertyChanging;
\r
3515 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3516 protected virtual void SendPropertyChanging()
\r
3518 if (PropertyChanging != null)
\r
3520 PropertyChanging(this, emptyChangingEventArgs);
\r
3526 #region INotifyPropertyChanged handling
\r
3528 public event PropertyChangedEventHandler PropertyChanged;
\r
3530 protected virtual void SendPropertyChanged(string propertyName)
\r
3532 if (PropertyChanged != null)
\r
3534 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3540 #region Extensibility Method Definitions
\r
3542 partial void OnCreated();
\r
3543 partial void OnAddressChanged();
\r
3544 partial void OnAddressChanging(string value);
\r
3545 partial void OnCityChanged();
\r
3546 partial void OnCityChanging(string value);
\r
3547 partial void OnCompanyNameChanged();
\r
3548 partial void OnCompanyNameChanging(string value);
\r
3549 partial void OnContactNameChanged();
\r
3550 partial void OnContactNameChanging(string value);
\r
3551 partial void OnContactTitleChanged();
\r
3552 partial void OnContactTitleChanging(string value);
\r
3553 partial void OnCountryChanged();
\r
3554 partial void OnCountryChanging(string value);
\r
3555 partial void OnFaxChanged();
\r
3556 partial void OnFaxChanging(string value);
\r
3557 partial void OnHomePageChanged();
\r
3558 partial void OnHomePageChanging(string value);
\r
3559 partial void OnPhoneChanged();
\r
3560 partial void OnPhoneChanging(string value);
\r
3561 partial void OnPostalCodeChanged();
\r
3562 partial void OnPostalCodeChanging(string value);
\r
3563 partial void OnRegionChanged();
\r
3564 partial void OnRegionChanging(string value);
\r
3565 partial void OnSupplierIDChanged();
\r
3566 partial void OnSupplierIDChanging(long value);
\r
3570 #region string Address
\r
3572 private string _address;
\r
3573 [DebuggerNonUserCode]
\r
3574 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3575 public string Address
\r
3583 if (value != _address)
\r
3585 OnAddressChanging(value);
\r
3586 SendPropertyChanging();
\r
3588 SendPropertyChanged("Address");
\r
3589 OnAddressChanged();
\r
3596 #region string City
\r
3598 private string _city;
\r
3599 [DebuggerNonUserCode]
\r
3600 [Column(Storage = "_city", Name = "City", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3601 public string City
\r
3609 if (value != _city)
\r
3611 OnCityChanging(value);
\r
3612 SendPropertyChanging();
\r
3614 SendPropertyChanged("City");
\r
3622 #region string CompanyName
\r
3624 private string _companyName;
\r
3625 [DebuggerNonUserCode]
\r
3626 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar", AutoSync = AutoSync.Never)]
\r
3627 public string CompanyName
\r
3631 return _companyName;
\r
3635 if (value != _companyName)
\r
3637 OnCompanyNameChanging(value);
\r
3638 SendPropertyChanging();
\r
3639 _companyName = value;
\r
3640 SendPropertyChanged("CompanyName");
\r
3641 OnCompanyNameChanged();
\r
3648 #region string ContactName
\r
3650 private string _contactName;
\r
3651 [DebuggerNonUserCode]
\r
3652 [Column(Storage = "_contactName", Name = "ContactName", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3653 public string ContactName
\r
3657 return _contactName;
\r
3661 if (value != _contactName)
\r
3663 OnContactNameChanging(value);
\r
3664 SendPropertyChanging();
\r
3665 _contactName = value;
\r
3666 SendPropertyChanged("ContactName");
\r
3667 OnContactNameChanged();
\r
3674 #region string ContactTitle
\r
3676 private string _contactTitle;
\r
3677 [DebuggerNonUserCode]
\r
3678 [Column(Storage = "_contactTitle", Name = "ContactTitle", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3679 public string ContactTitle
\r
3683 return _contactTitle;
\r
3687 if (value != _contactTitle)
\r
3689 OnContactTitleChanging(value);
\r
3690 SendPropertyChanging();
\r
3691 _contactTitle = value;
\r
3692 SendPropertyChanged("ContactTitle");
\r
3693 OnContactTitleChanged();
\r
3700 #region string Country
\r
3702 private string _country;
\r
3703 [DebuggerNonUserCode]
\r
3704 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3705 public string Country
\r
3713 if (value != _country)
\r
3715 OnCountryChanging(value);
\r
3716 SendPropertyChanging();
\r
3718 SendPropertyChanged("Country");
\r
3719 OnCountryChanged();
\r
3726 #region string Fax
\r
3728 private string _fax;
\r
3729 [DebuggerNonUserCode]
\r
3730 [Column(Storage = "_fax", Name = "Fax", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3739 if (value != _fax)
\r
3741 OnFaxChanging(value);
\r
3742 SendPropertyChanging();
\r
3744 SendPropertyChanged("Fax");
\r
3752 #region string HomePage
\r
3754 private string _homePage;
\r
3755 [DebuggerNonUserCode]
\r
3756 [Column(Storage = "_homePage", Name = "HomePage", DbType = "ntext", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3757 public string HomePage
\r
3765 if (value != _homePage)
\r
3767 OnHomePageChanging(value);
\r
3768 SendPropertyChanging();
\r
3769 _homePage = value;
\r
3770 SendPropertyChanged("HomePage");
\r
3771 OnHomePageChanged();
\r
3778 #region string Phone
\r
3780 private string _phone;
\r
3781 [DebuggerNonUserCode]
\r
3782 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3783 public string Phone
\r
3791 if (value != _phone)
\r
3793 OnPhoneChanging(value);
\r
3794 SendPropertyChanging();
\r
3796 SendPropertyChanged("Phone");
\r
3804 #region string PostalCode
\r
3806 private string _postalCode;
\r
3807 [DebuggerNonUserCode]
\r
3808 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3809 public string PostalCode
\r
3813 return _postalCode;
\r
3817 if (value != _postalCode)
\r
3819 OnPostalCodeChanging(value);
\r
3820 SendPropertyChanging();
\r
3821 _postalCode = value;
\r
3822 SendPropertyChanged("PostalCode");
\r
3823 OnPostalCodeChanged();
\r
3830 #region string Region
\r
3832 private string _region;
\r
3833 [DebuggerNonUserCode]
\r
3834 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar", AutoSync = AutoSync.Never, CanBeNull = true)]
\r
3835 public string Region
\r
3843 if (value != _region)
\r
3845 OnRegionChanging(value);
\r
3846 SendPropertyChanging();
\r
3848 SendPropertyChanged("Region");
\r
3849 OnRegionChanged();
\r
3856 #region long SupplierID
\r
3858 private long _supplierID;
\r
3859 [DebuggerNonUserCode]
\r
3860 [Column(Storage = "_supplierID", Name = "SupplierID", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never)]
\r
3861 public long SupplierID
\r
3865 return _supplierID;
\r
3869 if (value != _supplierID)
\r
3871 OnSupplierIDChanging(value);
\r
3872 SendPropertyChanging();
\r
3873 _supplierID = value;
\r
3874 SendPropertyChanged("SupplierID");
\r
3875 OnSupplierIDChanged();
\r
3884 private EntitySet<Product> _products;
\r
3885 [Association(Storage = "_products", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "FK_Products_0")]
\r
3886 [DebuggerNonUserCode]
\r
3887 public EntitySet<Product> Products
\r
3895 _products = value;
\r
3902 #region Attachement handlers
\r
3904 private void Products_Attach(Product entity)
\r
3906 entity.Supplier = this;
\r
3909 private void Products_Detach(Product entity)
\r
3911 entity.Supplier = null;
\r
3921 _products = new EntitySet<Product>(Products_Attach, Products_Detach);
\r
3929 [Table(Name = "Territories")]
\r
3930 public partial class Territory : INotifyPropertyChanging, INotifyPropertyChanged
\r
3932 #region INotifyPropertyChanging handling
\r
3934 public event PropertyChangingEventHandler PropertyChanging;
\r
3936 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3937 protected virtual void SendPropertyChanging()
\r
3939 if (PropertyChanging != null)
\r
3941 PropertyChanging(this, emptyChangingEventArgs);
\r
3947 #region INotifyPropertyChanged handling
\r
3949 public event PropertyChangedEventHandler PropertyChanged;
\r
3951 protected virtual void SendPropertyChanged(string propertyName)
\r
3953 if (PropertyChanged != null)
\r
3955 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3961 #region Extensibility Method Definitions
\r
3963 partial void OnCreated();
\r
3964 partial void OnRegionIDChanged();
\r
3965 partial void OnRegionIDChanging(long value);
\r
3966 partial void OnTerritoryDescriptionChanged();
\r
3967 partial void OnTerritoryDescriptionChanging(string value);
\r
3968 partial void OnTerritoryIDChanged();
\r
3969 partial void OnTerritoryIDChanging(string value);
\r
3973 #region long RegionID
\r
3975 private long _regionID;
\r
3976 [DebuggerNonUserCode]
\r
3977 [Column(Storage = "_regionID", Name = "RegionID", DbType = "integer", AutoSync = AutoSync.Never)]
\r
3978 public long RegionID
\r
3986 if (value != _regionID)
\r
3988 if (_region.HasLoadedOrAssignedValue)
\r
3990 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
3992 OnRegionIDChanging(value);
\r
3993 SendPropertyChanging();
\r
3994 _regionID = value;
\r
3995 SendPropertyChanged("RegionID");
\r
3996 OnRegionIDChanged();
\r
4003 #region string TerritoryDescription
\r
4005 private string _territoryDescription;
\r
4006 [DebuggerNonUserCode]
\r
4007 [Column(Storage = "_territoryDescription", Name = "TerritoryDescription", DbType = "nchar", AutoSync = AutoSync.Never)]
\r
4008 public string TerritoryDescription
\r
4012 return _territoryDescription;
\r
4016 if (value != _territoryDescription)
\r
4018 OnTerritoryDescriptionChanging(value);
\r
4019 SendPropertyChanging();
\r
4020 _territoryDescription = value;
\r
4021 SendPropertyChanged("TerritoryDescription");
\r
4022 OnTerritoryDescriptionChanged();
\r
4029 #region string TerritoryID
\r
4031 private string _territoryID;
\r
4032 [DebuggerNonUserCode]
\r
4033 [Column(Storage = "_territoryID", Name = "TerritoryID", DbType = "nvarchar", IsPrimaryKey = true, AutoSync = AutoSync.Never)]
\r
4034 public string TerritoryID
\r
4038 return _territoryID;
\r
4042 if (value != _territoryID)
\r
4044 OnTerritoryIDChanging(value);
\r
4045 SendPropertyChanging();
\r
4046 _territoryID = value;
\r
4047 SendPropertyChanged("TerritoryID");
\r
4048 OnTerritoryIDChanged();
\r
4057 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
4058 [Association(Storage = "_employeeTerritories", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "FK_EmployeeTerritories_0")]
\r
4059 [DebuggerNonUserCode]
\r
4060 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
4064 return _employeeTerritories;
\r
4068 _employeeTerritories = value;
\r
4077 private EntityRef<Region> _region;
\r
4078 [Association(Storage = "_region", OtherKey = "RegionID", ThisKey = "RegionID", Name = "FK_Territories_0", IsForeignKey = true)]
\r
4079 [DebuggerNonUserCode]
\r
4080 public Region Region
\r
4084 return _region.Entity;
\r
4088 if (value != _region.Entity)
\r
4090 if (_region.Entity != null)
\r
4092 var previousRegion = _region.Entity;
\r
4093 _region.Entity = null;
\r
4094 previousRegion.Territories.Remove(this);
\r
4096 _region.Entity = value;
\r
4097 if (value != null)
\r
4099 value.Territories.Add(this);
\r
4100 _regionID = value.RegionID;
\r
4104 _regionID = default(long);
\r
4113 #region Attachement handlers
\r
4115 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
4117 entity.Territory = this;
\r
4120 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
4122 entity.Territory = null;
\r
4130 public Territory()
\r
4132 _employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
\r
4133 _region = new EntityRef<Region>();
\r