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
21 using System.Data.Linq;
\r
22 #else // MONO_STRICT
\r
23 using DbLinq.Data.Linq;
\r
24 using DbLinq.Vendor;
\r
25 #endif // MONO_STRICT
\r
26 using System.ComponentModel;
\r
30 public partial class Northwind : DataContext
\r
32 #region Extensibility Method Definitions
\r
34 partial void OnCreated();
\r
38 public Northwind(string connectionString)
\r
39 : base(connectionString)
\r
44 public Northwind(IDbConnection connection)
\r
47 #else // MONO_STRICT
\r
48 : base(connection, new DbLinq.Sqlite.SqliteVendor())
\r
49 #endif // MONO_STRICT
\r
54 public Northwind(string connection, MappingSource mappingSource)
\r
55 : base(connection, mappingSource)
\r
60 public Northwind(IDbConnection connection, MappingSource mappingSource)
\r
61 : base(connection, mappingSource)
\r
67 public Northwind(IDbConnection connection, IVendor vendor)
\r
68 : base(connection, vendor)
\r
72 #endif // !MONO_STRICT
\r
75 public Northwind(IDbConnection connection, MappingSource mappingSource, IVendor vendor)
\r
76 : base(connection, mappingSource, vendor)
\r
80 #endif // !MONO_STRICT
\r
82 public Table<Category> Categories { get { return GetTable<Category>(); } }
\r
83 public Table<Customer> Customers { get { return GetTable<Customer>(); } }
\r
84 public Table<CustomerCustomerDemo> CustomerCustomerDemo { get { return GetTable<CustomerCustomerDemo>(); } }
\r
85 public Table<CustomerDemographic> CustomerDemographics { get { return GetTable<CustomerDemographic>(); } }
\r
86 public Table<Employee> Employees { get { return GetTable<Employee>(); } }
\r
87 public Table<EmployeeTerritory> EmployeeTerritories { get { return GetTable<EmployeeTerritory>(); } }
\r
88 public Table<Order> Orders { get { return GetTable<Order>(); } }
\r
89 public Table<OrderDetail> OrderDetails { get { return GetTable<OrderDetail>(); } }
\r
90 public Table<Product> Products { get { return GetTable<Product>(); } }
\r
91 public Table<Region> Regions { get { return GetTable<Region>(); } }
\r
92 public Table<Shipper> Shippers { get { return GetTable<Shipper>(); } }
\r
93 public Table<Supplier> Suppliers { get { return GetTable<Supplier>(); } }
\r
94 public Table<Territory> Territories { get { return GetTable<Territory>(); } }
\r
98 [Table(Name = "main.Categories")]
\r
99 public partial class Category : INotifyPropertyChanging, INotifyPropertyChanged
\r
101 #region INotifyPropertyChanging handling
\r
103 public event PropertyChangingEventHandler PropertyChanging;
\r
105 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
106 protected virtual void SendPropertyChanging()
\r
108 if (PropertyChanging != null)
\r
110 PropertyChanging(this, emptyChangingEventArgs);
\r
116 #region INotifyPropertyChanged handling
\r
118 public event PropertyChangedEventHandler PropertyChanged;
\r
120 protected virtual void SendPropertyChanged(string propertyName)
\r
122 if (PropertyChanged != null)
\r
124 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
130 #region Extensibility Method Definitions
\r
132 partial void OnCreated();
\r
133 partial void OnCategoryIDChanged();
\r
134 partial void OnCategoryIDChanging(int value);
\r
135 partial void OnCategoryNameChanged();
\r
136 partial void OnCategoryNameChanging(string value);
\r
137 partial void OnDescriptionChanged();
\r
138 partial void OnDescriptionChanging(string value);
\r
139 partial void OnPictureChanged();
\r
140 partial void OnPictureChanging(Byte[] value);
\r
144 #region int CategoryID
\r
146 private int _categoryID;
\r
147 [DebuggerNonUserCode]
\r
148 [Column(Storage = "_categoryID", Name = "CategoryID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
149 public int CategoryID
\r
153 return _categoryID;
\r
157 if (value != _categoryID)
\r
159 OnCategoryIDChanging(value);
\r
160 SendPropertyChanging();
\r
161 _categoryID = value;
\r
162 SendPropertyChanged("CategoryID");
\r
163 OnCategoryIDChanged();
\r
170 #region string CategoryName
\r
172 private string _categoryName;
\r
173 [DebuggerNonUserCode]
\r
174 [Column(Storage = "_categoryName", Name = "CategoryName", DbType = "nvarchar (15)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
175 public string CategoryName
\r
179 return _categoryName;
\r
183 if (value != _categoryName)
\r
185 OnCategoryNameChanging(value);
\r
186 SendPropertyChanging();
\r
187 _categoryName = value;
\r
188 SendPropertyChanged("CategoryName");
\r
189 OnCategoryNameChanged();
\r
196 #region string Description
\r
198 private string _description;
\r
199 [DebuggerNonUserCode]
\r
200 [Column(Storage = "_description", Name = "Description", DbType = "ntext", AutoSync = AutoSync.Never)]
\r
201 public string Description
\r
205 return _description;
\r
209 if (value != _description)
\r
211 OnDescriptionChanging(value);
\r
212 SendPropertyChanging();
\r
213 _description = value;
\r
214 SendPropertyChanged("Description");
\r
215 OnDescriptionChanged();
\r
222 #region Byte[] Picture
\r
224 private Byte[] _picture;
\r
225 [DebuggerNonUserCode]
\r
226 [Column(Storage = "_picture", Name = "Picture", DbType = "image", AutoSync = AutoSync.Never)]
\r
227 public Byte[] Picture
\r
235 if (value != _picture)
\r
237 OnPictureChanging(value);
\r
238 SendPropertyChanging();
\r
240 SendPropertyChanged("Picture");
\r
241 OnPictureChanged();
\r
250 private EntitySet<Product> _products;
\r
251 [Association(Storage = "_products", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "fk_Products_1")]
\r
252 [DebuggerNonUserCode]
\r
253 public EntitySet<Product> Products
\r
268 #region Attachement handlers
\r
270 private void Products_Attach(Product entity)
\r
272 entity.Category = this;
\r
275 private void Products_Detach(Product entity)
\r
277 entity.Category = null;
\r
287 _products = new EntitySet<Product>(Products_Attach, Products_Detach);
\r
295 [Table(Name = "main.Customers")]
\r
296 public partial class Customer : INotifyPropertyChanging, INotifyPropertyChanged
\r
298 #region INotifyPropertyChanging handling
\r
300 public event PropertyChangingEventHandler PropertyChanging;
\r
302 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
303 protected virtual void SendPropertyChanging()
\r
305 if (PropertyChanging != null)
\r
307 PropertyChanging(this, emptyChangingEventArgs);
\r
313 #region INotifyPropertyChanged handling
\r
315 public event PropertyChangedEventHandler PropertyChanged;
\r
317 protected virtual void SendPropertyChanged(string propertyName)
\r
319 if (PropertyChanged != null)
\r
321 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
327 #region Extensibility Method Definitions
\r
329 partial void OnCreated();
\r
330 partial void OnAddressChanged();
\r
331 partial void OnAddressChanging(string value);
\r
332 partial void OnCityChanged();
\r
333 partial void OnCityChanging(string value);
\r
334 partial void OnCompanyNameChanged();
\r
335 partial void OnCompanyNameChanging(string value);
\r
336 partial void OnContactNameChanged();
\r
337 partial void OnContactNameChanging(string value);
\r
338 partial void OnContactTitleChanged();
\r
339 partial void OnContactTitleChanging(string value);
\r
340 partial void OnCountryChanged();
\r
341 partial void OnCountryChanging(string value);
\r
342 partial void OnCustomerIDChanged();
\r
343 partial void OnCustomerIDChanging(string value);
\r
344 partial void OnFaxChanged();
\r
345 partial void OnFaxChanging(string value);
\r
346 partial void OnPhoneChanged();
\r
347 partial void OnPhoneChanging(string value);
\r
348 partial void OnPostalCodeChanged();
\r
349 partial void OnPostalCodeChanging(string value);
\r
350 partial void OnRegionChanged();
\r
351 partial void OnRegionChanging(string value);
\r
355 #region string Address
\r
357 private string _address;
\r
358 [DebuggerNonUserCode]
\r
359 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar (60)", AutoSync = AutoSync.Never)]
\r
360 public string Address
\r
368 if (value != _address)
\r
370 OnAddressChanging(value);
\r
371 SendPropertyChanging();
\r
373 SendPropertyChanged("Address");
\r
374 OnAddressChanged();
\r
381 #region string City
\r
383 private string _city;
\r
384 [DebuggerNonUserCode]
\r
385 [Column(Storage = "_city", Name = "City", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
394 if (value != _city)
\r
396 OnCityChanging(value);
\r
397 SendPropertyChanging();
\r
399 SendPropertyChanged("City");
\r
407 #region string CompanyName
\r
409 private string _companyName;
\r
410 [DebuggerNonUserCode]
\r
411 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar (40)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
412 public string CompanyName
\r
416 return _companyName;
\r
420 if (value != _companyName)
\r
422 OnCompanyNameChanging(value);
\r
423 SendPropertyChanging();
\r
424 _companyName = value;
\r
425 SendPropertyChanged("CompanyName");
\r
426 OnCompanyNameChanged();
\r
433 #region string ContactName
\r
435 private string _contactName;
\r
436 [DebuggerNonUserCode]
\r
437 [Column(Storage = "_contactName", Name = "ContactName", DbType = "nvarchar (30)", AutoSync = AutoSync.Never)]
\r
438 public string ContactName
\r
442 return _contactName;
\r
446 if (value != _contactName)
\r
448 OnContactNameChanging(value);
\r
449 SendPropertyChanging();
\r
450 _contactName = value;
\r
451 SendPropertyChanged("ContactName");
\r
452 OnContactNameChanged();
\r
459 #region string ContactTitle
\r
461 private string _contactTitle;
\r
462 [DebuggerNonUserCode]
\r
463 [Column(Storage = "_contactTitle", Name = "ContactTitle", DbType = "nvarchar (30)", AutoSync = AutoSync.Never)]
\r
464 public string ContactTitle
\r
468 return _contactTitle;
\r
472 if (value != _contactTitle)
\r
474 OnContactTitleChanging(value);
\r
475 SendPropertyChanging();
\r
476 _contactTitle = value;
\r
477 SendPropertyChanged("ContactTitle");
\r
478 OnContactTitleChanged();
\r
485 #region string Country
\r
487 private string _country;
\r
488 [DebuggerNonUserCode]
\r
489 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
490 public string Country
\r
498 if (value != _country)
\r
500 OnCountryChanging(value);
\r
501 SendPropertyChanging();
\r
503 SendPropertyChanged("Country");
\r
504 OnCountryChanged();
\r
511 #region string CustomerID
\r
513 private string _customerID;
\r
514 [DebuggerNonUserCode]
\r
515 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar (5)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
516 public string CustomerID
\r
520 return _customerID;
\r
524 if (value != _customerID)
\r
526 OnCustomerIDChanging(value);
\r
527 SendPropertyChanging();
\r
528 _customerID = value;
\r
529 SendPropertyChanged("CustomerID");
\r
530 OnCustomerIDChanged();
\r
539 private string _fax;
\r
540 [DebuggerNonUserCode]
\r
541 [Column(Storage = "_fax", Name = "Fax", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
552 OnFaxChanging(value);
\r
553 SendPropertyChanging();
\r
555 SendPropertyChanged("Fax");
\r
563 #region string Phone
\r
565 private string _phone;
\r
566 [DebuggerNonUserCode]
\r
567 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
568 public string Phone
\r
576 if (value != _phone)
\r
578 OnPhoneChanging(value);
\r
579 SendPropertyChanging();
\r
581 SendPropertyChanged("Phone");
\r
589 #region string PostalCode
\r
591 private string _postalCode;
\r
592 [DebuggerNonUserCode]
\r
593 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar (10)", AutoSync = AutoSync.Never)]
\r
594 public string PostalCode
\r
598 return _postalCode;
\r
602 if (value != _postalCode)
\r
604 OnPostalCodeChanging(value);
\r
605 SendPropertyChanging();
\r
606 _postalCode = value;
\r
607 SendPropertyChanged("PostalCode");
\r
608 OnPostalCodeChanged();
\r
615 #region string Region
\r
617 private string _region;
\r
618 [DebuggerNonUserCode]
\r
619 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
620 public string Region
\r
628 if (value != _region)
\r
630 OnRegionChanging(value);
\r
631 SendPropertyChanging();
\r
633 SendPropertyChanged("Region");
\r
643 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
644 [Association(Storage = "_customerCustomerDemo", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "fk_CustomerCustomerDemo_0")]
\r
645 [DebuggerNonUserCode]
\r
646 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
650 return _customerCustomerDemo;
\r
654 _customerCustomerDemo = value;
\r
658 private EntitySet<Order> _orders;
\r
659 [Association(Storage = "_orders", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "fk_Orders_2")]
\r
660 [DebuggerNonUserCode]
\r
661 public EntitySet<Order> Orders
\r
676 #region Attachement handlers
\r
678 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
680 entity.Customer = this;
\r
683 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
685 entity.Customer = null;
\r
688 private void Orders_Attach(Order entity)
\r
690 entity.Customer = this;
\r
693 private void Orders_Detach(Order entity)
\r
695 entity.Customer = null;
\r
705 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(CustomerCustomerDemo_Attach, CustomerCustomerDemo_Detach);
\r
706 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
714 [Table(Name = "main.CustomerCustomerDemo")]
\r
715 public partial class CustomerCustomerDemo : INotifyPropertyChanging, INotifyPropertyChanged
\r
717 #region INotifyPropertyChanging handling
\r
719 public event PropertyChangingEventHandler PropertyChanging;
\r
721 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
722 protected virtual void SendPropertyChanging()
\r
724 if (PropertyChanging != null)
\r
726 PropertyChanging(this, emptyChangingEventArgs);
\r
732 #region INotifyPropertyChanged handling
\r
734 public event PropertyChangedEventHandler PropertyChanged;
\r
736 protected virtual void SendPropertyChanged(string propertyName)
\r
738 if (PropertyChanged != null)
\r
740 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
746 #region Extensibility Method Definitions
\r
748 partial void OnCreated();
\r
749 partial void OnCustomerIDChanged();
\r
750 partial void OnCustomerIDChanging(string value);
\r
751 partial void OnCustomerTypeIDChanged();
\r
752 partial void OnCustomerTypeIDChanging(string value);
\r
756 #region string CustomerID
\r
758 private string _customerID;
\r
759 [DebuggerNonUserCode]
\r
760 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar (5)", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
761 public string CustomerID
\r
765 return _customerID;
\r
769 if (value != _customerID)
\r
771 if (_customer.HasLoadedOrAssignedValue)
\r
773 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
775 OnCustomerIDChanging(value);
\r
776 SendPropertyChanging();
\r
777 _customerID = value;
\r
778 SendPropertyChanged("CustomerID");
\r
779 OnCustomerIDChanged();
\r
786 #region string CustomerTypeID
\r
788 private string _customerTypeID;
\r
789 [DebuggerNonUserCode]
\r
790 [Column(Storage = "_customerTypeID", Name = "CustomerTypeID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
791 public string CustomerTypeID
\r
795 return _customerTypeID;
\r
799 if (value != _customerTypeID)
\r
801 if (_customerDemographic.HasLoadedOrAssignedValue)
\r
803 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
805 OnCustomerTypeIDChanging(value);
\r
806 SendPropertyChanging();
\r
807 _customerTypeID = value;
\r
808 SendPropertyChanged("CustomerTypeID");
\r
809 OnCustomerTypeIDChanged();
\r
818 private EntityRef<Customer> _customer;
\r
819 [Association(Storage = "_customer", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "fk_CustomerCustomerDemo_0", IsForeignKey = true)]
\r
820 [DebuggerNonUserCode]
\r
821 public Customer Customer
\r
825 return _customer.Entity;
\r
829 if (value != _customer.Entity)
\r
831 if (_customer.Entity != null)
\r
833 var previousCustomer = _customer.Entity;
\r
834 _customer.Entity = null;
\r
835 previousCustomer.CustomerCustomerDemo.Remove(this);
\r
837 _customer.Entity = value;
\r
840 value.CustomerCustomerDemo.Add(this);
\r
841 _customerID = value.CustomerID;
\r
845 _customerID = default(string);
\r
851 private EntityRef<CustomerDemographic> _customerDemographic;
\r
852 [Association(Storage = "_customerDemographic", OtherKey = "CustomerTypeID", ThisKey = "CustomerTypeID", Name = "fk_CustomerCustomerDemo_1", IsForeignKey = true)]
\r
853 [DebuggerNonUserCode]
\r
854 public CustomerDemographic CustomerDemographic
\r
858 return _customerDemographic.Entity;
\r
862 if (value != _customerDemographic.Entity)
\r
864 if (_customerDemographic.Entity != null)
\r
866 var previousCustomerDemographic = _customerDemographic.Entity;
\r
867 _customerDemographic.Entity = null;
\r
868 previousCustomerDemographic.CustomerCustomerDemo.Remove(this);
\r
870 _customerDemographic.Entity = value;
\r
873 value.CustomerCustomerDemo.Add(this);
\r
874 _customerTypeID = value.CustomerTypeID;
\r
878 _customerTypeID = default(string);
\r
889 public CustomerCustomerDemo()
\r
891 _customer = new EntityRef<Customer>();
\r
892 _customerDemographic = new EntityRef<CustomerDemographic>();
\r
900 [Table(Name = "main.CustomerDemographics")]
\r
901 public partial class CustomerDemographic : INotifyPropertyChanging, INotifyPropertyChanged
\r
903 #region INotifyPropertyChanging handling
\r
905 public event PropertyChangingEventHandler PropertyChanging;
\r
907 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
908 protected virtual void SendPropertyChanging()
\r
910 if (PropertyChanging != null)
\r
912 PropertyChanging(this, emptyChangingEventArgs);
\r
918 #region INotifyPropertyChanged handling
\r
920 public event PropertyChangedEventHandler PropertyChanged;
\r
922 protected virtual void SendPropertyChanged(string propertyName)
\r
924 if (PropertyChanged != null)
\r
926 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
932 #region Extensibility Method Definitions
\r
934 partial void OnCreated();
\r
935 partial void OnCustomerDescChanged();
\r
936 partial void OnCustomerDescChanging(string value);
\r
937 partial void OnCustomerTypeIDChanged();
\r
938 partial void OnCustomerTypeIDChanging(string value);
\r
942 #region string CustomerDesc
\r
944 private string _customerDesc;
\r
945 [DebuggerNonUserCode]
\r
946 [Column(Storage = "_customerDesc", Name = "CustomerDesc", DbType = "ntext", AutoSync = AutoSync.Never)]
\r
947 public string CustomerDesc
\r
951 return _customerDesc;
\r
955 if (value != _customerDesc)
\r
957 OnCustomerDescChanging(value);
\r
958 SendPropertyChanging();
\r
959 _customerDesc = value;
\r
960 SendPropertyChanged("CustomerDesc");
\r
961 OnCustomerDescChanged();
\r
968 #region string CustomerTypeID
\r
970 private string _customerTypeID;
\r
971 [DebuggerNonUserCode]
\r
972 [Column(Storage = "_customerTypeID", Name = "CustomerTypeID", DbType = "nchar", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
973 public string CustomerTypeID
\r
977 return _customerTypeID;
\r
981 if (value != _customerTypeID)
\r
983 OnCustomerTypeIDChanging(value);
\r
984 SendPropertyChanging();
\r
985 _customerTypeID = value;
\r
986 SendPropertyChanged("CustomerTypeID");
\r
987 OnCustomerTypeIDChanged();
\r
996 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
997 [Association(Storage = "_customerCustomerDemo", OtherKey = "CustomerTypeID", ThisKey = "CustomerTypeID", Name = "fk_CustomerCustomerDemo_1")]
\r
998 [DebuggerNonUserCode]
\r
999 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
1003 return _customerCustomerDemo;
\r
1007 _customerCustomerDemo = value;
\r
1014 #region Attachement handlers
\r
1016 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
1018 entity.CustomerDemographic = this;
\r
1021 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
1023 entity.CustomerDemographic = null;
\r
1031 public CustomerDemographic()
\r
1033 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(CustomerCustomerDemo_Attach, CustomerCustomerDemo_Detach);
\r
1041 [Table(Name = "main.Employees")]
\r
1042 public partial class Employee : INotifyPropertyChanging, INotifyPropertyChanged
\r
1044 #region INotifyPropertyChanging handling
\r
1046 public event PropertyChangingEventHandler PropertyChanging;
\r
1048 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1049 protected virtual void SendPropertyChanging()
\r
1051 if (PropertyChanging != null)
\r
1053 PropertyChanging(this, emptyChangingEventArgs);
\r
1059 #region INotifyPropertyChanged handling
\r
1061 public event PropertyChangedEventHandler PropertyChanged;
\r
1063 protected virtual void SendPropertyChanged(string propertyName)
\r
1065 if (PropertyChanged != null)
\r
1067 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1073 #region Extensibility Method Definitions
\r
1075 partial void OnCreated();
\r
1076 partial void OnAddressChanged();
\r
1077 partial void OnAddressChanging(string value);
\r
1078 partial void OnBirthDateChanged();
\r
1079 partial void OnBirthDateChanging(DateTime? value);
\r
1080 partial void OnCityChanged();
\r
1081 partial void OnCityChanging(string value);
\r
1082 partial void OnCountryChanged();
\r
1083 partial void OnCountryChanging(string value);
\r
1084 partial void OnEmployeeIDChanged();
\r
1085 partial void OnEmployeeIDChanging(int value);
\r
1086 partial void OnExtensionChanged();
\r
1087 partial void OnExtensionChanging(string value);
\r
1088 partial void OnFirstNameChanged();
\r
1089 partial void OnFirstNameChanging(string value);
\r
1090 partial void OnHireDateChanged();
\r
1091 partial void OnHireDateChanging(DateTime? value);
\r
1092 partial void OnHomePhoneChanged();
\r
1093 partial void OnHomePhoneChanging(string value);
\r
1094 partial void OnLastNameChanged();
\r
1095 partial void OnLastNameChanging(string value);
\r
1096 partial void OnNotesChanged();
\r
1097 partial void OnNotesChanging(string value);
\r
1098 partial void OnPhotoChanged();
\r
1099 partial void OnPhotoChanging(Byte[] value);
\r
1100 partial void OnPhotoPathChanged();
\r
1101 partial void OnPhotoPathChanging(string value);
\r
1102 partial void OnPostalCodeChanged();
\r
1103 partial void OnPostalCodeChanging(string value);
\r
1104 partial void OnRegionChanged();
\r
1105 partial void OnRegionChanging(string value);
\r
1106 partial void OnReportsToChanged();
\r
1107 partial void OnReportsToChanging(int? value);
\r
1108 partial void OnTitleChanged();
\r
1109 partial void OnTitleChanging(string value);
\r
1110 partial void OnTitleOfCourtesyChanged();
\r
1111 partial void OnTitleOfCourtesyChanging(string value);
\r
1115 #region string Address
\r
1117 private string _address;
\r
1118 [DebuggerNonUserCode]
\r
1119 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar (60)", AutoSync = AutoSync.Never)]
\r
1120 public string Address
\r
1128 if (value != _address)
\r
1130 OnAddressChanging(value);
\r
1131 SendPropertyChanging();
\r
1133 SendPropertyChanged("Address");
\r
1134 OnAddressChanged();
\r
1141 #region DateTime? BirthDate
\r
1143 private DateTime? _birthDate;
\r
1144 [DebuggerNonUserCode]
\r
1145 [Column(Storage = "_birthDate", Name = "BirthDate", DbType = "datetime", AutoSync = AutoSync.Never)]
\r
1146 public DateTime? BirthDate
\r
1150 return _birthDate;
\r
1154 if (value != _birthDate)
\r
1156 OnBirthDateChanging(value);
\r
1157 SendPropertyChanging();
\r
1158 _birthDate = value;
\r
1159 SendPropertyChanged("BirthDate");
\r
1160 OnBirthDateChanged();
\r
1167 #region string City
\r
1169 private string _city;
\r
1170 [DebuggerNonUserCode]
\r
1171 [Column(Storage = "_city", Name = "City", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
1172 public string City
\r
1180 if (value != _city)
\r
1182 OnCityChanging(value);
\r
1183 SendPropertyChanging();
\r
1185 SendPropertyChanged("City");
\r
1193 #region string Country
\r
1195 private string _country;
\r
1196 [DebuggerNonUserCode]
\r
1197 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
1198 public string Country
\r
1206 if (value != _country)
\r
1208 OnCountryChanging(value);
\r
1209 SendPropertyChanging();
\r
1211 SendPropertyChanged("Country");
\r
1212 OnCountryChanged();
\r
1219 #region int EmployeeID
\r
1221 private int _employeeID;
\r
1222 [DebuggerNonUserCode]
\r
1223 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
1224 public int EmployeeID
\r
1228 return _employeeID;
\r
1232 if (value != _employeeID)
\r
1234 OnEmployeeIDChanging(value);
\r
1235 SendPropertyChanging();
\r
1236 _employeeID = value;
\r
1237 SendPropertyChanged("EmployeeID");
\r
1238 OnEmployeeIDChanged();
\r
1245 #region string Extension
\r
1247 private string _extension;
\r
1248 [DebuggerNonUserCode]
\r
1249 [Column(Storage = "_extension", Name = "Extension", DbType = "nvarchar (4)", AutoSync = AutoSync.Never)]
\r
1250 public string Extension
\r
1254 return _extension;
\r
1258 if (value != _extension)
\r
1260 OnExtensionChanging(value);
\r
1261 SendPropertyChanging();
\r
1262 _extension = value;
\r
1263 SendPropertyChanged("Extension");
\r
1264 OnExtensionChanged();
\r
1271 #region string FirstName
\r
1273 private string _firstName;
\r
1274 [DebuggerNonUserCode]
\r
1275 [Column(Storage = "_firstName", Name = "FirstName", DbType = "nvarchar (10)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
1276 public string FirstName
\r
1280 return _firstName;
\r
1284 if (value != _firstName)
\r
1286 OnFirstNameChanging(value);
\r
1287 SendPropertyChanging();
\r
1288 _firstName = value;
\r
1289 SendPropertyChanged("FirstName");
\r
1290 OnFirstNameChanged();
\r
1297 #region DateTime? HireDate
\r
1299 private DateTime? _hireDate;
\r
1300 [DebuggerNonUserCode]
\r
1301 [Column(Storage = "_hireDate", Name = "HireDate", DbType = "datetime", AutoSync = AutoSync.Never)]
\r
1302 public DateTime? HireDate
\r
1310 if (value != _hireDate)
\r
1312 OnHireDateChanging(value);
\r
1313 SendPropertyChanging();
\r
1314 _hireDate = value;
\r
1315 SendPropertyChanged("HireDate");
\r
1316 OnHireDateChanged();
\r
1323 #region string HomePhone
\r
1325 private string _homePhone;
\r
1326 [DebuggerNonUserCode]
\r
1327 [Column(Storage = "_homePhone", Name = "HomePhone", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
1328 public string HomePhone
\r
1332 return _homePhone;
\r
1336 if (value != _homePhone)
\r
1338 OnHomePhoneChanging(value);
\r
1339 SendPropertyChanging();
\r
1340 _homePhone = value;
\r
1341 SendPropertyChanged("HomePhone");
\r
1342 OnHomePhoneChanged();
\r
1349 #region string LastName
\r
1351 private string _lastName;
\r
1352 [DebuggerNonUserCode]
\r
1353 [Column(Storage = "_lastName", Name = "LastName", DbType = "nvarchar (20)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
1354 public string LastName
\r
1362 if (value != _lastName)
\r
1364 OnLastNameChanging(value);
\r
1365 SendPropertyChanging();
\r
1366 _lastName = value;
\r
1367 SendPropertyChanged("LastName");
\r
1368 OnLastNameChanged();
\r
1375 #region string Notes
\r
1377 private string _notes;
\r
1378 [DebuggerNonUserCode]
\r
1379 [Column(Storage = "_notes", Name = "Notes", DbType = "ntext", AutoSync = AutoSync.Never)]
\r
1380 public string Notes
\r
1388 if (value != _notes)
\r
1390 OnNotesChanging(value);
\r
1391 SendPropertyChanging();
\r
1393 SendPropertyChanged("Notes");
\r
1401 #region Byte[] Photo
\r
1403 private Byte[] _photo;
\r
1404 [DebuggerNonUserCode]
\r
1405 [Column(Storage = "_photo", Name = "Photo", DbType = "image", AutoSync = AutoSync.Never)]
\r
1406 public Byte[] Photo
\r
1414 if (value != _photo)
\r
1416 OnPhotoChanging(value);
\r
1417 SendPropertyChanging();
\r
1419 SendPropertyChanged("Photo");
\r
1427 #region string PhotoPath
\r
1429 private string _photoPath;
\r
1430 [DebuggerNonUserCode]
\r
1431 [Column(Storage = "_photoPath", Name = "PhotoPath", DbType = "nvarchar (255)", AutoSync = AutoSync.Never)]
\r
1432 public string PhotoPath
\r
1436 return _photoPath;
\r
1440 if (value != _photoPath)
\r
1442 OnPhotoPathChanging(value);
\r
1443 SendPropertyChanging();
\r
1444 _photoPath = value;
\r
1445 SendPropertyChanged("PhotoPath");
\r
1446 OnPhotoPathChanged();
\r
1453 #region string PostalCode
\r
1455 private string _postalCode;
\r
1456 [DebuggerNonUserCode]
\r
1457 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar (10)", AutoSync = AutoSync.Never)]
\r
1458 public string PostalCode
\r
1462 return _postalCode;
\r
1466 if (value != _postalCode)
\r
1468 OnPostalCodeChanging(value);
\r
1469 SendPropertyChanging();
\r
1470 _postalCode = value;
\r
1471 SendPropertyChanged("PostalCode");
\r
1472 OnPostalCodeChanged();
\r
1479 #region string Region
\r
1481 private string _region;
\r
1482 [DebuggerNonUserCode]
\r
1483 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
1484 public string Region
\r
1492 if (value != _region)
\r
1494 OnRegionChanging(value);
\r
1495 SendPropertyChanging();
\r
1497 SendPropertyChanged("Region");
\r
1498 OnRegionChanged();
\r
1505 #region int? ReportsTo
\r
1507 private int? _reportsTo;
\r
1508 [DebuggerNonUserCode]
\r
1509 [Column(Storage = "_reportsTo", Name = "ReportsTo", DbType = "INTEGER", AutoSync = AutoSync.Never)]
\r
1510 public int? ReportsTo
\r
1514 return _reportsTo;
\r
1518 if (value != _reportsTo)
\r
1520 if (_reportsToEmployee.HasLoadedOrAssignedValue)
\r
1522 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1524 OnReportsToChanging(value);
\r
1525 SendPropertyChanging();
\r
1526 _reportsTo = value;
\r
1527 SendPropertyChanged("ReportsTo");
\r
1528 OnReportsToChanged();
\r
1535 #region string Title
\r
1537 private string _title;
\r
1538 [DebuggerNonUserCode]
\r
1539 [Column(Storage = "_title", Name = "Title", DbType = "nvarchar (30)", AutoSync = AutoSync.Never)]
\r
1540 public string Title
\r
1548 if (value != _title)
\r
1550 OnTitleChanging(value);
\r
1551 SendPropertyChanging();
\r
1553 SendPropertyChanged("Title");
\r
1561 #region string TitleOfCourtesy
\r
1563 private string _titleOfCourtesy;
\r
1564 [DebuggerNonUserCode]
\r
1565 [Column(Storage = "_titleOfCourtesy", Name = "TitleOfCourtesy", DbType = "nvarchar (25)", AutoSync = AutoSync.Never)]
\r
1566 public string TitleOfCourtesy
\r
1570 return _titleOfCourtesy;
\r
1574 if (value != _titleOfCourtesy)
\r
1576 OnTitleOfCourtesyChanging(value);
\r
1577 SendPropertyChanging();
\r
1578 _titleOfCourtesy = value;
\r
1579 SendPropertyChanged("TitleOfCourtesy");
\r
1580 OnTitleOfCourtesyChanged();
\r
1589 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
1590 [Association(Storage = "_employeeTerritories", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "fk_EmployeeTerritories_1")]
\r
1591 [DebuggerNonUserCode]
\r
1592 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
1596 return _employeeTerritories;
\r
1600 _employeeTerritories = value;
\r
1604 private EntitySet<Employee> _employees;
\r
1605 [Association(Storage = "_employees", OtherKey = "ReportsTo", ThisKey = "EmployeeID", Name = "fk_Employees_0")]
\r
1606 [DebuggerNonUserCode]
\r
1607 public EntitySet<Employee> Employees
\r
1611 return _employees;
\r
1615 _employees = value;
\r
1619 private EntitySet<Order> _orders;
\r
1620 [Association(Storage = "_orders", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "fk_Orders_1")]
\r
1621 [DebuggerNonUserCode]
\r
1622 public EntitySet<Order> Orders
\r
1639 private EntityRef<Employee> _reportsToEmployee;
\r
1640 [Association(Storage = "_reportsToEmployee", OtherKey = "EmployeeID", ThisKey = "ReportsTo", Name = "fk_Employees_0", IsForeignKey = true)]
\r
1641 [DebuggerNonUserCode]
\r
1642 public Employee ReportsToEmployee
\r
1646 return _reportsToEmployee.Entity;
\r
1650 if (value != _reportsToEmployee.Entity)
\r
1652 if (_reportsToEmployee.Entity != null)
\r
1654 var previousEmployee = _reportsToEmployee.Entity;
\r
1655 _reportsToEmployee.Entity = null;
\r
1656 previousEmployee.Employees.Remove(this);
\r
1658 _reportsToEmployee.Entity = value;
\r
1659 if (value != null)
\r
1661 value.Employees.Add(this);
\r
1662 _reportsTo = value.EmployeeID;
\r
1666 _reportsTo = null;
\r
1675 #region Attachement handlers
\r
1677 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
1679 entity.Employee = this;
\r
1682 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
1684 entity.Employee = null;
\r
1687 private void Employees_Attach(Employee entity)
\r
1689 entity.ReportsToEmployee = this;
\r
1692 private void Employees_Detach(Employee entity)
\r
1694 entity.ReportsToEmployee = null;
\r
1697 private void Orders_Attach(Order entity)
\r
1699 entity.Employee = this;
\r
1702 private void Orders_Detach(Order entity)
\r
1704 entity.Employee = null;
\r
1714 _employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
\r
1715 _employees = new EntitySet<Employee>(Employees_Attach, Employees_Detach);
\r
1716 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
1717 _reportsToEmployee = new EntityRef<Employee>();
\r
1725 [Table(Name = "main.EmployeeTerritories")]
\r
1726 public partial class EmployeeTerritory : INotifyPropertyChanging, INotifyPropertyChanged
\r
1728 #region INotifyPropertyChanging handling
\r
1730 public event PropertyChangingEventHandler PropertyChanging;
\r
1732 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1733 protected virtual void SendPropertyChanging()
\r
1735 if (PropertyChanging != null)
\r
1737 PropertyChanging(this, emptyChangingEventArgs);
\r
1743 #region INotifyPropertyChanged handling
\r
1745 public event PropertyChangedEventHandler PropertyChanged;
\r
1747 protected virtual void SendPropertyChanged(string propertyName)
\r
1749 if (PropertyChanged != null)
\r
1751 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1757 #region Extensibility Method Definitions
\r
1759 partial void OnCreated();
\r
1760 partial void OnEmployeeIDChanged();
\r
1761 partial void OnEmployeeIDChanging(int value);
\r
1762 partial void OnTerritoryIDChanged();
\r
1763 partial void OnTerritoryIDChanging(string value);
\r
1767 #region int EmployeeID
\r
1769 private int _employeeID;
\r
1770 [DebuggerNonUserCode]
\r
1771 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
1772 public int EmployeeID
\r
1776 return _employeeID;
\r
1780 if (value != _employeeID)
\r
1782 if (_employee.HasLoadedOrAssignedValue)
\r
1784 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1786 OnEmployeeIDChanging(value);
\r
1787 SendPropertyChanging();
\r
1788 _employeeID = value;
\r
1789 SendPropertyChanged("EmployeeID");
\r
1790 OnEmployeeIDChanged();
\r
1797 #region string TerritoryID
\r
1799 private string _territoryID;
\r
1800 [DebuggerNonUserCode]
\r
1801 [Column(Storage = "_territoryID", Name = "TerritoryID", DbType = "nvarchar", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
1802 public string TerritoryID
\r
1806 return _territoryID;
\r
1810 if (value != _territoryID)
\r
1812 if (_territory.HasLoadedOrAssignedValue)
\r
1814 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1816 OnTerritoryIDChanging(value);
\r
1817 SendPropertyChanging();
\r
1818 _territoryID = value;
\r
1819 SendPropertyChanged("TerritoryID");
\r
1820 OnTerritoryIDChanged();
\r
1829 private EntityRef<Territory> _territory;
\r
1830 [Association(Storage = "_territory", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "fk_EmployeeTerritories_0", IsForeignKey = true)]
\r
1831 [DebuggerNonUserCode]
\r
1832 public Territory Territory
\r
1836 return _territory.Entity;
\r
1840 if (value != _territory.Entity)
\r
1842 if (_territory.Entity != null)
\r
1844 var previousTerritory = _territory.Entity;
\r
1845 _territory.Entity = null;
\r
1846 previousTerritory.EmployeeTerritories.Remove(this);
\r
1848 _territory.Entity = value;
\r
1849 if (value != null)
\r
1851 value.EmployeeTerritories.Add(this);
\r
1852 _territoryID = value.TerritoryID;
\r
1856 _territoryID = default(string);
\r
1862 private EntityRef<Employee> _employee;
\r
1863 [Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "fk_EmployeeTerritories_1", IsForeignKey = true)]
\r
1864 [DebuggerNonUserCode]
\r
1865 public Employee Employee
\r
1869 return _employee.Entity;
\r
1873 if (value != _employee.Entity)
\r
1875 if (_employee.Entity != null)
\r
1877 var previousEmployee = _employee.Entity;
\r
1878 _employee.Entity = null;
\r
1879 previousEmployee.EmployeeTerritories.Remove(this);
\r
1881 _employee.Entity = value;
\r
1882 if (value != null)
\r
1884 value.EmployeeTerritories.Add(this);
\r
1885 _employeeID = value.EmployeeID;
\r
1889 _employeeID = default(int);
\r
1900 public EmployeeTerritory()
\r
1902 _territory = new EntityRef<Territory>();
\r
1903 _employee = new EntityRef<Employee>();
\r
1911 [Table(Name = "main.Orders")]
\r
1912 public partial class Order : INotifyPropertyChanging, INotifyPropertyChanged
\r
1914 #region INotifyPropertyChanging handling
\r
1916 public event PropertyChangingEventHandler PropertyChanging;
\r
1918 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
1919 protected virtual void SendPropertyChanging()
\r
1921 if (PropertyChanging != null)
\r
1923 PropertyChanging(this, emptyChangingEventArgs);
\r
1929 #region INotifyPropertyChanged handling
\r
1931 public event PropertyChangedEventHandler PropertyChanged;
\r
1933 protected virtual void SendPropertyChanged(string propertyName)
\r
1935 if (PropertyChanged != null)
\r
1937 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
1943 #region Extensibility Method Definitions
\r
1945 partial void OnCreated();
\r
1946 partial void OnCustomerIDChanged();
\r
1947 partial void OnCustomerIDChanging(string value);
\r
1948 partial void OnEmployeeIDChanged();
\r
1949 partial void OnEmployeeIDChanging(int? value);
\r
1950 partial void OnFreightChanged();
\r
1951 partial void OnFreightChanging(decimal? value);
\r
1952 partial void OnOrderDateChanged();
\r
1953 partial void OnOrderDateChanging(DateTime? value);
\r
1954 partial void OnOrderIDChanged();
\r
1955 partial void OnOrderIDChanging(int value);
\r
1956 partial void OnRequiredDateChanged();
\r
1957 partial void OnRequiredDateChanging(DateTime? value);
\r
1958 partial void OnShipAddressChanged();
\r
1959 partial void OnShipAddressChanging(string value);
\r
1960 partial void OnShipCityChanged();
\r
1961 partial void OnShipCityChanging(string value);
\r
1962 partial void OnShipCountryChanged();
\r
1963 partial void OnShipCountryChanging(string value);
\r
1964 partial void OnShipNameChanged();
\r
1965 partial void OnShipNameChanging(string value);
\r
1966 partial void OnShippedDateChanged();
\r
1967 partial void OnShippedDateChanging(DateTime? value);
\r
1968 partial void OnShipPostalCodeChanged();
\r
1969 partial void OnShipPostalCodeChanging(string value);
\r
1970 partial void OnShipRegionChanged();
\r
1971 partial void OnShipRegionChanging(string value);
\r
1972 partial void OnShipViaChanged();
\r
1973 partial void OnShipViaChanging(int? value);
\r
1977 #region string CustomerID
\r
1979 private string _customerID;
\r
1980 [DebuggerNonUserCode]
\r
1981 [Column(Storage = "_customerID", Name = "CustomerID", DbType = "nchar (5)", AutoSync = AutoSync.Never)]
\r
1982 public string CustomerID
\r
1986 return _customerID;
\r
1990 if (value != _customerID)
\r
1992 if (_customer.HasLoadedOrAssignedValue)
\r
1994 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1996 OnCustomerIDChanging(value);
\r
1997 SendPropertyChanging();
\r
1998 _customerID = value;
\r
1999 SendPropertyChanged("CustomerID");
\r
2000 OnCustomerIDChanged();
\r
2007 #region int? EmployeeID
\r
2009 private int? _employeeID;
\r
2010 [DebuggerNonUserCode]
\r
2011 [Column(Storage = "_employeeID", Name = "EmployeeID", DbType = "INTEGER", AutoSync = AutoSync.Never)]
\r
2012 public int? EmployeeID
\r
2016 return _employeeID;
\r
2020 if (value != _employeeID)
\r
2022 if (_employee.HasLoadedOrAssignedValue)
\r
2024 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2026 OnEmployeeIDChanging(value);
\r
2027 SendPropertyChanging();
\r
2028 _employeeID = value;
\r
2029 SendPropertyChanged("EmployeeID");
\r
2030 OnEmployeeIDChanged();
\r
2037 #region decimal? Freight
\r
2039 private decimal? _freight;
\r
2040 [DebuggerNonUserCode]
\r
2041 [Column(Storage = "_freight", Name = "Freight", DbType = "money", AutoSync = AutoSync.Never)]
\r
2042 public decimal? Freight
\r
2050 if (value != _freight)
\r
2052 OnFreightChanging(value);
\r
2053 SendPropertyChanging();
\r
2055 SendPropertyChanged("Freight");
\r
2056 OnFreightChanged();
\r
2063 #region DateTime? OrderDate
\r
2065 private DateTime? _orderDate;
\r
2066 [DebuggerNonUserCode]
\r
2067 [Column(Storage = "_orderDate", Name = "OrderDate", DbType = "datetime", AutoSync = AutoSync.Never)]
\r
2068 public DateTime? OrderDate
\r
2072 return _orderDate;
\r
2076 if (value != _orderDate)
\r
2078 OnOrderDateChanging(value);
\r
2079 SendPropertyChanging();
\r
2080 _orderDate = value;
\r
2081 SendPropertyChanged("OrderDate");
\r
2082 OnOrderDateChanged();
\r
2089 #region int OrderID
\r
2091 private int _orderID;
\r
2092 [DebuggerNonUserCode]
\r
2093 [Column(Storage = "_orderID", Name = "OrderID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2094 public int OrderID
\r
2102 if (value != _orderID)
\r
2104 OnOrderIDChanging(value);
\r
2105 SendPropertyChanging();
\r
2107 SendPropertyChanged("OrderID");
\r
2108 OnOrderIDChanged();
\r
2115 #region DateTime? RequiredDate
\r
2117 private DateTime? _requiredDate;
\r
2118 [DebuggerNonUserCode]
\r
2119 [Column(Storage = "_requiredDate", Name = "RequiredDate", DbType = "datetime", AutoSync = AutoSync.Never)]
\r
2120 public DateTime? RequiredDate
\r
2124 return _requiredDate;
\r
2128 if (value != _requiredDate)
\r
2130 OnRequiredDateChanging(value);
\r
2131 SendPropertyChanging();
\r
2132 _requiredDate = value;
\r
2133 SendPropertyChanged("RequiredDate");
\r
2134 OnRequiredDateChanged();
\r
2141 #region string ShipAddress
\r
2143 private string _shipAddress;
\r
2144 [DebuggerNonUserCode]
\r
2145 [Column(Storage = "_shipAddress", Name = "ShipAddress", DbType = "nvarchar (60)", AutoSync = AutoSync.Never)]
\r
2146 public string ShipAddress
\r
2150 return _shipAddress;
\r
2154 if (value != _shipAddress)
\r
2156 OnShipAddressChanging(value);
\r
2157 SendPropertyChanging();
\r
2158 _shipAddress = value;
\r
2159 SendPropertyChanged("ShipAddress");
\r
2160 OnShipAddressChanged();
\r
2167 #region string ShipCity
\r
2169 private string _shipCity;
\r
2170 [DebuggerNonUserCode]
\r
2171 [Column(Storage = "_shipCity", Name = "ShipCity", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
2172 public string ShipCity
\r
2180 if (value != _shipCity)
\r
2182 OnShipCityChanging(value);
\r
2183 SendPropertyChanging();
\r
2184 _shipCity = value;
\r
2185 SendPropertyChanged("ShipCity");
\r
2186 OnShipCityChanged();
\r
2193 #region string ShipCountry
\r
2195 private string _shipCountry;
\r
2196 [DebuggerNonUserCode]
\r
2197 [Column(Storage = "_shipCountry", Name = "ShipCountry", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
2198 public string ShipCountry
\r
2202 return _shipCountry;
\r
2206 if (value != _shipCountry)
\r
2208 OnShipCountryChanging(value);
\r
2209 SendPropertyChanging();
\r
2210 _shipCountry = value;
\r
2211 SendPropertyChanged("ShipCountry");
\r
2212 OnShipCountryChanged();
\r
2219 #region string ShipName
\r
2221 private string _shipName;
\r
2222 [DebuggerNonUserCode]
\r
2223 [Column(Storage = "_shipName", Name = "ShipName", DbType = "nvarchar (40)", AutoSync = AutoSync.Never)]
\r
2224 public string ShipName
\r
2232 if (value != _shipName)
\r
2234 OnShipNameChanging(value);
\r
2235 SendPropertyChanging();
\r
2236 _shipName = value;
\r
2237 SendPropertyChanged("ShipName");
\r
2238 OnShipNameChanged();
\r
2245 #region DateTime? ShippedDate
\r
2247 private DateTime? _shippedDate;
\r
2248 [DebuggerNonUserCode]
\r
2249 [Column(Storage = "_shippedDate", Name = "ShippedDate", DbType = "datetime", AutoSync = AutoSync.Never)]
\r
2250 public DateTime? ShippedDate
\r
2254 return _shippedDate;
\r
2258 if (value != _shippedDate)
\r
2260 OnShippedDateChanging(value);
\r
2261 SendPropertyChanging();
\r
2262 _shippedDate = value;
\r
2263 SendPropertyChanged("ShippedDate");
\r
2264 OnShippedDateChanged();
\r
2271 #region string ShipPostalCode
\r
2273 private string _shipPostalCode;
\r
2274 [DebuggerNonUserCode]
\r
2275 [Column(Storage = "_shipPostalCode", Name = "ShipPostalCode", DbType = "nvarchar (10)", AutoSync = AutoSync.Never)]
\r
2276 public string ShipPostalCode
\r
2280 return _shipPostalCode;
\r
2284 if (value != _shipPostalCode)
\r
2286 OnShipPostalCodeChanging(value);
\r
2287 SendPropertyChanging();
\r
2288 _shipPostalCode = value;
\r
2289 SendPropertyChanged("ShipPostalCode");
\r
2290 OnShipPostalCodeChanged();
\r
2297 #region string ShipRegion
\r
2299 private string _shipRegion;
\r
2300 [DebuggerNonUserCode]
\r
2301 [Column(Storage = "_shipRegion", Name = "ShipRegion", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
2302 public string ShipRegion
\r
2306 return _shipRegion;
\r
2310 if (value != _shipRegion)
\r
2312 OnShipRegionChanging(value);
\r
2313 SendPropertyChanging();
\r
2314 _shipRegion = value;
\r
2315 SendPropertyChanged("ShipRegion");
\r
2316 OnShipRegionChanged();
\r
2323 #region int? ShipVia
\r
2325 private int? _shipVia;
\r
2326 [DebuggerNonUserCode]
\r
2327 [Column(Storage = "_shipVia", Name = "ShipVia", DbType = "INTEGER", AutoSync = AutoSync.Never)]
\r
2328 public int? ShipVia
\r
2336 if (value != _shipVia)
\r
2338 if (_shipper.HasLoadedOrAssignedValue)
\r
2340 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2342 OnShipViaChanging(value);
\r
2343 SendPropertyChanging();
\r
2345 SendPropertyChanged("ShipVia");
\r
2346 OnShipViaChanged();
\r
2355 private EntitySet<OrderDetail> _orderDetails;
\r
2356 [Association(Storage = "_orderDetails", OtherKey = "OrderID", ThisKey = "OrderID", Name = "\"fk_Order Details_1\"")]
\r
2357 [DebuggerNonUserCode]
\r
2358 public EntitySet<OrderDetail> OrderDetails
\r
2362 return _orderDetails;
\r
2366 _orderDetails = value;
\r
2375 private EntityRef<Shipper> _shipper;
\r
2376 [Association(Storage = "_shipper", OtherKey = "ShipperID", ThisKey = "ShipVia", Name = "fk_Orders_0", IsForeignKey = true)]
\r
2377 [DebuggerNonUserCode]
\r
2378 public Shipper Shipper
\r
2382 return _shipper.Entity;
\r
2386 if (value != _shipper.Entity)
\r
2388 if (_shipper.Entity != null)
\r
2390 var previousShipper = _shipper.Entity;
\r
2391 _shipper.Entity = null;
\r
2392 previousShipper.Orders.Remove(this);
\r
2394 _shipper.Entity = value;
\r
2395 if (value != null)
\r
2397 value.Orders.Add(this);
\r
2398 _shipVia = value.ShipperID;
\r
2408 private EntityRef<Employee> _employee;
\r
2409 [Association(Storage = "_employee", OtherKey = "EmployeeID", ThisKey = "EmployeeID", Name = "fk_Orders_1", IsForeignKey = true)]
\r
2410 [DebuggerNonUserCode]
\r
2411 public Employee Employee
\r
2415 return _employee.Entity;
\r
2419 if (value != _employee.Entity)
\r
2421 if (_employee.Entity != null)
\r
2423 var previousEmployee = _employee.Entity;
\r
2424 _employee.Entity = null;
\r
2425 previousEmployee.Orders.Remove(this);
\r
2427 _employee.Entity = value;
\r
2428 if (value != null)
\r
2430 value.Orders.Add(this);
\r
2431 _employeeID = value.EmployeeID;
\r
2435 _employeeID = null;
\r
2441 private EntityRef<Customer> _customer;
\r
2442 [Association(Storage = "_customer", OtherKey = "CustomerID", ThisKey = "CustomerID", Name = "fk_Orders_2", IsForeignKey = true)]
\r
2443 [DebuggerNonUserCode]
\r
2444 public Customer Customer
\r
2448 return _customer.Entity;
\r
2452 if (value != _customer.Entity)
\r
2454 if (_customer.Entity != null)
\r
2456 var previousCustomer = _customer.Entity;
\r
2457 _customer.Entity = null;
\r
2458 previousCustomer.Orders.Remove(this);
\r
2460 _customer.Entity = value;
\r
2461 if (value != null)
\r
2463 value.Orders.Add(this);
\r
2464 _customerID = value.CustomerID;
\r
2468 _customerID = null;
\r
2477 #region Attachement handlers
\r
2479 private void OrderDetails_Attach(OrderDetail entity)
\r
2481 entity.Order = this;
\r
2484 private void OrderDetails_Detach(OrderDetail entity)
\r
2486 entity.Order = null;
\r
2496 _orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
\r
2497 _shipper = new EntityRef<Shipper>();
\r
2498 _employee = new EntityRef<Employee>();
\r
2499 _customer = new EntityRef<Customer>();
\r
2507 [Table(Name = "main.\"Order Details\"")]
\r
2508 public partial class OrderDetail : INotifyPropertyChanging, INotifyPropertyChanged
\r
2510 #region INotifyPropertyChanging handling
\r
2512 public event PropertyChangingEventHandler PropertyChanging;
\r
2514 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
2515 protected virtual void SendPropertyChanging()
\r
2517 if (PropertyChanging != null)
\r
2519 PropertyChanging(this, emptyChangingEventArgs);
\r
2525 #region INotifyPropertyChanged handling
\r
2527 public event PropertyChangedEventHandler PropertyChanged;
\r
2529 protected virtual void SendPropertyChanged(string propertyName)
\r
2531 if (PropertyChanged != null)
\r
2533 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
2539 #region Extensibility Method Definitions
\r
2541 partial void OnCreated();
\r
2542 partial void OnDiscountChanged();
\r
2543 partial void OnDiscountChanging(float value);
\r
2544 partial void OnOrderIDChanged();
\r
2545 partial void OnOrderIDChanging(int value);
\r
2546 partial void OnProductIDChanged();
\r
2547 partial void OnProductIDChanging(int value);
\r
2548 partial void OnQuantityChanged();
\r
2549 partial void OnQuantityChanging(short value);
\r
2550 partial void OnUnitPriceChanged();
\r
2551 partial void OnUnitPriceChanging(decimal value);
\r
2555 #region float Discount
\r
2557 private float _discount;
\r
2558 [DebuggerNonUserCode]
\r
2559 [Column(Storage = "_discount", Name = "Discount", DbType = "real", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2560 public float Discount
\r
2568 if (value != _discount)
\r
2570 OnDiscountChanging(value);
\r
2571 SendPropertyChanging();
\r
2572 _discount = value;
\r
2573 SendPropertyChanged("Discount");
\r
2574 OnDiscountChanged();
\r
2581 #region int OrderID
\r
2583 private int _orderID;
\r
2584 [DebuggerNonUserCode]
\r
2585 [Column(Storage = "_orderID", Name = "OrderID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2586 public int OrderID
\r
2594 if (value != _orderID)
\r
2596 if (_order.HasLoadedOrAssignedValue)
\r
2598 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2600 OnOrderIDChanging(value);
\r
2601 SendPropertyChanging();
\r
2603 SendPropertyChanged("OrderID");
\r
2604 OnOrderIDChanged();
\r
2611 #region int ProductID
\r
2613 private int _productID;
\r
2614 [DebuggerNonUserCode]
\r
2615 [Column(Storage = "_productID", Name = "ProductID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2616 public int ProductID
\r
2620 return _productID;
\r
2624 if (value != _productID)
\r
2626 if (_product.HasLoadedOrAssignedValue)
\r
2628 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2630 OnProductIDChanging(value);
\r
2631 SendPropertyChanging();
\r
2632 _productID = value;
\r
2633 SendPropertyChanged("ProductID");
\r
2634 OnProductIDChanged();
\r
2641 #region short Quantity
\r
2643 private short _quantity;
\r
2644 [DebuggerNonUserCode]
\r
2645 [Column(Storage = "_quantity", Name = "Quantity", DbType = "smallint", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2646 public short Quantity
\r
2654 if (value != _quantity)
\r
2656 OnQuantityChanging(value);
\r
2657 SendPropertyChanging();
\r
2658 _quantity = value;
\r
2659 SendPropertyChanged("Quantity");
\r
2660 OnQuantityChanged();
\r
2667 #region decimal UnitPrice
\r
2669 private decimal _unitPrice;
\r
2670 [DebuggerNonUserCode]
\r
2671 [Column(Storage = "_unitPrice", Name = "UnitPrice", DbType = "money", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2672 public decimal UnitPrice
\r
2676 return _unitPrice;
\r
2680 if (value != _unitPrice)
\r
2682 OnUnitPriceChanging(value);
\r
2683 SendPropertyChanging();
\r
2684 _unitPrice = value;
\r
2685 SendPropertyChanged("UnitPrice");
\r
2686 OnUnitPriceChanged();
\r
2695 private EntityRef<Product> _product;
\r
2696 [Association(Storage = "_product", OtherKey = "ProductID", ThisKey = "ProductID", Name = "\"fk_Order Details_0\"", IsForeignKey = true)]
\r
2697 [DebuggerNonUserCode]
\r
2698 public Product Product
\r
2702 return _product.Entity;
\r
2706 if (value != _product.Entity)
\r
2708 if (_product.Entity != null)
\r
2710 var previousProduct = _product.Entity;
\r
2711 _product.Entity = null;
\r
2712 previousProduct.OrderDetails.Remove(this);
\r
2714 _product.Entity = value;
\r
2715 if (value != null)
\r
2717 value.OrderDetails.Add(this);
\r
2718 _productID = value.ProductID;
\r
2722 _productID = default(int);
\r
2728 private EntityRef<Order> _order;
\r
2729 [Association(Storage = "_order", OtherKey = "OrderID", ThisKey = "OrderID", Name = "\"fk_Order Details_1\"", IsForeignKey = true)]
\r
2730 [DebuggerNonUserCode]
\r
2731 public Order Order
\r
2735 return _order.Entity;
\r
2739 if (value != _order.Entity)
\r
2741 if (_order.Entity != null)
\r
2743 var previousOrder = _order.Entity;
\r
2744 _order.Entity = null;
\r
2745 previousOrder.OrderDetails.Remove(this);
\r
2747 _order.Entity = value;
\r
2748 if (value != null)
\r
2750 value.OrderDetails.Add(this);
\r
2751 _orderID = value.OrderID;
\r
2755 _orderID = default(int);
\r
2766 public OrderDetail()
\r
2768 _product = new EntityRef<Product>();
\r
2769 _order = new EntityRef<Order>();
\r
2777 [Table(Name = "main.Products")]
\r
2778 public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged
\r
2780 #region INotifyPropertyChanging handling
\r
2782 public event PropertyChangingEventHandler PropertyChanging;
\r
2784 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
2785 protected virtual void SendPropertyChanging()
\r
2787 if (PropertyChanging != null)
\r
2789 PropertyChanging(this, emptyChangingEventArgs);
\r
2795 #region INotifyPropertyChanged handling
\r
2797 public event PropertyChangedEventHandler PropertyChanged;
\r
2799 protected virtual void SendPropertyChanged(string propertyName)
\r
2801 if (PropertyChanged != null)
\r
2803 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
2809 #region Extensibility Method Definitions
\r
2811 partial void OnCreated();
\r
2812 partial void OnCategoryIDChanged();
\r
2813 partial void OnCategoryIDChanging(int? value);
\r
2814 partial void OnDiscontinuedChanged();
\r
2815 partial void OnDiscontinuedChanging(bool value);
\r
2816 partial void OnProductIDChanged();
\r
2817 partial void OnProductIDChanging(int value);
\r
2818 partial void OnProductNameChanged();
\r
2819 partial void OnProductNameChanging(string value);
\r
2820 partial void OnQuantityPerUnitChanged();
\r
2821 partial void OnQuantityPerUnitChanging(string value);
\r
2822 partial void OnReorderLevelChanged();
\r
2823 partial void OnReorderLevelChanging(short? value);
\r
2824 partial void OnSupplierIDChanged();
\r
2825 partial void OnSupplierIDChanging(int? value);
\r
2826 partial void OnUnitPriceChanged();
\r
2827 partial void OnUnitPriceChanging(decimal? value);
\r
2828 partial void OnUnitsInStockChanged();
\r
2829 partial void OnUnitsInStockChanging(short? value);
\r
2830 partial void OnUnitsOnOrderChanged();
\r
2831 partial void OnUnitsOnOrderChanging(short? value);
\r
2835 #region int? CategoryID
\r
2837 private int? _categoryID;
\r
2838 [DebuggerNonUserCode]
\r
2839 [Column(Storage = "_categoryID", Name = "CategoryID", DbType = "INTEGER", AutoSync = AutoSync.Never)]
\r
2840 public int? CategoryID
\r
2844 return _categoryID;
\r
2848 if (value != _categoryID)
\r
2850 if (_category.HasLoadedOrAssignedValue)
\r
2852 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2854 OnCategoryIDChanging(value);
\r
2855 SendPropertyChanging();
\r
2856 _categoryID = value;
\r
2857 SendPropertyChanged("CategoryID");
\r
2858 OnCategoryIDChanged();
\r
2865 #region bool Discontinued
\r
2867 private bool _discontinued;
\r
2868 [DebuggerNonUserCode]
\r
2869 [Column(Storage = "_discontinued", Name = "Discontinued", DbType = "bit", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2870 public bool Discontinued
\r
2874 return _discontinued;
\r
2878 if (value != _discontinued)
\r
2880 OnDiscontinuedChanging(value);
\r
2881 SendPropertyChanging();
\r
2882 _discontinued = value;
\r
2883 SendPropertyChanged("Discontinued");
\r
2884 OnDiscontinuedChanged();
\r
2891 #region int ProductID
\r
2893 private int _productID;
\r
2894 [DebuggerNonUserCode]
\r
2895 [Column(Storage = "_productID", Name = "ProductID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2896 public int ProductID
\r
2900 return _productID;
\r
2904 if (value != _productID)
\r
2906 OnProductIDChanging(value);
\r
2907 SendPropertyChanging();
\r
2908 _productID = value;
\r
2909 SendPropertyChanged("ProductID");
\r
2910 OnProductIDChanged();
\r
2917 #region string ProductName
\r
2919 private string _productName;
\r
2920 [DebuggerNonUserCode]
\r
2921 [Column(Storage = "_productName", Name = "ProductName", DbType = "nvarchar (40)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
2922 public string ProductName
\r
2926 return _productName;
\r
2930 if (value != _productName)
\r
2932 OnProductNameChanging(value);
\r
2933 SendPropertyChanging();
\r
2934 _productName = value;
\r
2935 SendPropertyChanged("ProductName");
\r
2936 OnProductNameChanged();
\r
2943 #region string QuantityPerUnit
\r
2945 private string _quantityPerUnit;
\r
2946 [DebuggerNonUserCode]
\r
2947 [Column(Storage = "_quantityPerUnit", Name = "QuantityPerUnit", DbType = "nvarchar (20)", AutoSync = AutoSync.Never)]
\r
2948 public string QuantityPerUnit
\r
2952 return _quantityPerUnit;
\r
2956 if (value != _quantityPerUnit)
\r
2958 OnQuantityPerUnitChanging(value);
\r
2959 SendPropertyChanging();
\r
2960 _quantityPerUnit = value;
\r
2961 SendPropertyChanged("QuantityPerUnit");
\r
2962 OnQuantityPerUnitChanged();
\r
2969 #region short? ReorderLevel
\r
2971 private short? _reorderLevel;
\r
2972 [DebuggerNonUserCode]
\r
2973 [Column(Storage = "_reorderLevel", Name = "ReorderLevel", DbType = "smallint", AutoSync = AutoSync.Never)]
\r
2974 public short? ReorderLevel
\r
2978 return _reorderLevel;
\r
2982 if (value != _reorderLevel)
\r
2984 OnReorderLevelChanging(value);
\r
2985 SendPropertyChanging();
\r
2986 _reorderLevel = value;
\r
2987 SendPropertyChanged("ReorderLevel");
\r
2988 OnReorderLevelChanged();
\r
2995 #region int? SupplierID
\r
2997 private int? _supplierID;
\r
2998 [DebuggerNonUserCode]
\r
2999 [Column(Storage = "_supplierID", Name = "SupplierID", DbType = "INTEGER", AutoSync = AutoSync.Never)]
\r
3000 public int? SupplierID
\r
3004 return _supplierID;
\r
3008 if (value != _supplierID)
\r
3010 if (_supplier.HasLoadedOrAssignedValue)
\r
3012 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
3014 OnSupplierIDChanging(value);
\r
3015 SendPropertyChanging();
\r
3016 _supplierID = value;
\r
3017 SendPropertyChanged("SupplierID");
\r
3018 OnSupplierIDChanged();
\r
3025 #region decimal? UnitPrice
\r
3027 private decimal? _unitPrice;
\r
3028 [DebuggerNonUserCode]
\r
3029 [Column(Storage = "_unitPrice", Name = "UnitPrice", DbType = "money", AutoSync = AutoSync.Never)]
\r
3030 public decimal? UnitPrice
\r
3034 return _unitPrice;
\r
3038 if (value != _unitPrice)
\r
3040 OnUnitPriceChanging(value);
\r
3041 SendPropertyChanging();
\r
3042 _unitPrice = value;
\r
3043 SendPropertyChanged("UnitPrice");
\r
3044 OnUnitPriceChanged();
\r
3051 #region short? UnitsInStock
\r
3053 private short? _unitsInStock;
\r
3054 [DebuggerNonUserCode]
\r
3055 [Column(Storage = "_unitsInStock", Name = "UnitsInStock", DbType = "smallint", AutoSync = AutoSync.Never)]
\r
3056 public short? UnitsInStock
\r
3060 return _unitsInStock;
\r
3064 if (value != _unitsInStock)
\r
3066 OnUnitsInStockChanging(value);
\r
3067 SendPropertyChanging();
\r
3068 _unitsInStock = value;
\r
3069 SendPropertyChanged("UnitsInStock");
\r
3070 OnUnitsInStockChanged();
\r
3077 #region short? UnitsOnOrder
\r
3079 private short? _unitsOnOrder;
\r
3080 [DebuggerNonUserCode]
\r
3081 [Column(Storage = "_unitsOnOrder", Name = "UnitsOnOrder", DbType = "smallint", AutoSync = AutoSync.Never)]
\r
3082 public short? UnitsOnOrder
\r
3086 return _unitsOnOrder;
\r
3090 if (value != _unitsOnOrder)
\r
3092 OnUnitsOnOrderChanging(value);
\r
3093 SendPropertyChanging();
\r
3094 _unitsOnOrder = value;
\r
3095 SendPropertyChanged("UnitsOnOrder");
\r
3096 OnUnitsOnOrderChanged();
\r
3105 private EntitySet<OrderDetail> _orderDetails;
\r
3106 [Association(Storage = "_orderDetails", OtherKey = "ProductID", ThisKey = "ProductID", Name = "\"fk_Order Details_0\"")]
\r
3107 [DebuggerNonUserCode]
\r
3108 public EntitySet<OrderDetail> OrderDetails
\r
3112 return _orderDetails;
\r
3116 _orderDetails = value;
\r
3125 private EntityRef<Supplier> _supplier;
\r
3126 [Association(Storage = "_supplier", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "fk_Products_0", IsForeignKey = true)]
\r
3127 [DebuggerNonUserCode]
\r
3128 public Supplier Supplier
\r
3132 return _supplier.Entity;
\r
3136 if (value != _supplier.Entity)
\r
3138 if (_supplier.Entity != null)
\r
3140 var previousSupplier = _supplier.Entity;
\r
3141 _supplier.Entity = null;
\r
3142 previousSupplier.Products.Remove(this);
\r
3144 _supplier.Entity = value;
\r
3145 if (value != null)
\r
3147 value.Products.Add(this);
\r
3148 _supplierID = value.SupplierID;
\r
3152 _supplierID = null;
\r
3158 private EntityRef<Category> _category;
\r
3159 [Association(Storage = "_category", OtherKey = "CategoryID", ThisKey = "CategoryID", Name = "fk_Products_1", IsForeignKey = true)]
\r
3160 [DebuggerNonUserCode]
\r
3161 public Category Category
\r
3165 return _category.Entity;
\r
3169 if (value != _category.Entity)
\r
3171 if (_category.Entity != null)
\r
3173 var previousCategory = _category.Entity;
\r
3174 _category.Entity = null;
\r
3175 previousCategory.Products.Remove(this);
\r
3177 _category.Entity = value;
\r
3178 if (value != null)
\r
3180 value.Products.Add(this);
\r
3181 _categoryID = value.CategoryID;
\r
3185 _categoryID = null;
\r
3194 #region Attachement handlers
\r
3196 private void OrderDetails_Attach(OrderDetail entity)
\r
3198 entity.Product = this;
\r
3201 private void OrderDetails_Detach(OrderDetail entity)
\r
3203 entity.Product = null;
\r
3213 _orderDetails = new EntitySet<OrderDetail>(OrderDetails_Attach, OrderDetails_Detach);
\r
3214 _supplier = new EntityRef<Supplier>();
\r
3215 _category = new EntityRef<Category>();
\r
3223 [Table(Name = "main.Region")]
\r
3224 public partial class Region : INotifyPropertyChanging, INotifyPropertyChanged
\r
3226 #region INotifyPropertyChanging handling
\r
3228 public event PropertyChangingEventHandler PropertyChanging;
\r
3230 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3231 protected virtual void SendPropertyChanging()
\r
3233 if (PropertyChanging != null)
\r
3235 PropertyChanging(this, emptyChangingEventArgs);
\r
3241 #region INotifyPropertyChanged handling
\r
3243 public event PropertyChangedEventHandler PropertyChanged;
\r
3245 protected virtual void SendPropertyChanged(string propertyName)
\r
3247 if (PropertyChanged != null)
\r
3249 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3255 #region Extensibility Method Definitions
\r
3257 partial void OnCreated();
\r
3258 partial void OnRegionDescriptionChanged();
\r
3259 partial void OnRegionDescriptionChanging(string value);
\r
3260 partial void OnRegionIDChanged();
\r
3261 partial void OnRegionIDChanging(int value);
\r
3265 #region string RegionDescription
\r
3267 private string _regionDescription;
\r
3268 [DebuggerNonUserCode]
\r
3269 [Column(Storage = "_regionDescription", Name = "RegionDescription", DbType = "nchar", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3270 public string RegionDescription
\r
3274 return _regionDescription;
\r
3278 if (value != _regionDescription)
\r
3280 OnRegionDescriptionChanging(value);
\r
3281 SendPropertyChanging();
\r
3282 _regionDescription = value;
\r
3283 SendPropertyChanged("RegionDescription");
\r
3284 OnRegionDescriptionChanged();
\r
3291 #region int RegionID
\r
3293 private int _regionID;
\r
3294 [DebuggerNonUserCode]
\r
3295 [Column(Storage = "_regionID", Name = "RegionID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3296 public int RegionID
\r
3304 if (value != _regionID)
\r
3306 OnRegionIDChanging(value);
\r
3307 SendPropertyChanging();
\r
3308 _regionID = value;
\r
3309 SendPropertyChanged("RegionID");
\r
3310 OnRegionIDChanged();
\r
3319 private EntitySet<Territory> _territories;
\r
3320 [Association(Storage = "_territories", OtherKey = "RegionID", ThisKey = "RegionID", Name = "fk_Territories_0")]
\r
3321 [DebuggerNonUserCode]
\r
3322 public EntitySet<Territory> Territories
\r
3326 return _territories;
\r
3330 _territories = value;
\r
3337 #region Attachement handlers
\r
3339 private void Territories_Attach(Territory entity)
\r
3341 entity.Region = this;
\r
3344 private void Territories_Detach(Territory entity)
\r
3346 entity.Region = null;
\r
3356 _territories = new EntitySet<Territory>(Territories_Attach, Territories_Detach);
\r
3364 [Table(Name = "main.Shippers")]
\r
3365 public partial class Shipper : INotifyPropertyChanging, INotifyPropertyChanged
\r
3367 #region INotifyPropertyChanging handling
\r
3369 public event PropertyChangingEventHandler PropertyChanging;
\r
3371 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3372 protected virtual void SendPropertyChanging()
\r
3374 if (PropertyChanging != null)
\r
3376 PropertyChanging(this, emptyChangingEventArgs);
\r
3382 #region INotifyPropertyChanged handling
\r
3384 public event PropertyChangedEventHandler PropertyChanged;
\r
3386 protected virtual void SendPropertyChanged(string propertyName)
\r
3388 if (PropertyChanged != null)
\r
3390 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3396 #region Extensibility Method Definitions
\r
3398 partial void OnCreated();
\r
3399 partial void OnCompanyNameChanged();
\r
3400 partial void OnCompanyNameChanging(string value);
\r
3401 partial void OnPhoneChanged();
\r
3402 partial void OnPhoneChanging(string value);
\r
3403 partial void OnShipperIDChanged();
\r
3404 partial void OnShipperIDChanging(int value);
\r
3408 #region string CompanyName
\r
3410 private string _companyName;
\r
3411 [DebuggerNonUserCode]
\r
3412 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar (40)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3413 public string CompanyName
\r
3417 return _companyName;
\r
3421 if (value != _companyName)
\r
3423 OnCompanyNameChanging(value);
\r
3424 SendPropertyChanging();
\r
3425 _companyName = value;
\r
3426 SendPropertyChanged("CompanyName");
\r
3427 OnCompanyNameChanged();
\r
3434 #region string Phone
\r
3436 private string _phone;
\r
3437 [DebuggerNonUserCode]
\r
3438 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
3439 public string Phone
\r
3447 if (value != _phone)
\r
3449 OnPhoneChanging(value);
\r
3450 SendPropertyChanging();
\r
3452 SendPropertyChanged("Phone");
\r
3460 #region int ShipperID
\r
3462 private int _shipperID;
\r
3463 [DebuggerNonUserCode]
\r
3464 [Column(Storage = "_shipperID", Name = "ShipperID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3465 public int ShipperID
\r
3469 return _shipperID;
\r
3473 if (value != _shipperID)
\r
3475 OnShipperIDChanging(value);
\r
3476 SendPropertyChanging();
\r
3477 _shipperID = value;
\r
3478 SendPropertyChanged("ShipperID");
\r
3479 OnShipperIDChanged();
\r
3488 private EntitySet<Order> _orders;
\r
3489 [Association(Storage = "_orders", OtherKey = "ShipVia", ThisKey = "ShipperID", Name = "fk_Orders_0")]
\r
3490 [DebuggerNonUserCode]
\r
3491 public EntitySet<Order> Orders
\r
3506 #region Attachement handlers
\r
3508 private void Orders_Attach(Order entity)
\r
3510 entity.Shipper = this;
\r
3513 private void Orders_Detach(Order entity)
\r
3515 entity.Shipper = null;
\r
3525 _orders = new EntitySet<Order>(Orders_Attach, Orders_Detach);
\r
3533 [Table(Name = "main.Suppliers")]
\r
3534 public partial class Supplier : INotifyPropertyChanging, INotifyPropertyChanged
\r
3536 #region INotifyPropertyChanging handling
\r
3538 public event PropertyChangingEventHandler PropertyChanging;
\r
3540 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3541 protected virtual void SendPropertyChanging()
\r
3543 if (PropertyChanging != null)
\r
3545 PropertyChanging(this, emptyChangingEventArgs);
\r
3551 #region INotifyPropertyChanged handling
\r
3553 public event PropertyChangedEventHandler PropertyChanged;
\r
3555 protected virtual void SendPropertyChanged(string propertyName)
\r
3557 if (PropertyChanged != null)
\r
3559 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3565 #region Extensibility Method Definitions
\r
3567 partial void OnCreated();
\r
3568 partial void OnAddressChanged();
\r
3569 partial void OnAddressChanging(string value);
\r
3570 partial void OnCityChanged();
\r
3571 partial void OnCityChanging(string value);
\r
3572 partial void OnCompanyNameChanged();
\r
3573 partial void OnCompanyNameChanging(string value);
\r
3574 partial void OnContactNameChanged();
\r
3575 partial void OnContactNameChanging(string value);
\r
3576 partial void OnContactTitleChanged();
\r
3577 partial void OnContactTitleChanging(string value);
\r
3578 partial void OnCountryChanged();
\r
3579 partial void OnCountryChanging(string value);
\r
3580 partial void OnFaxChanged();
\r
3581 partial void OnFaxChanging(string value);
\r
3582 partial void OnHomePageChanged();
\r
3583 partial void OnHomePageChanging(string value);
\r
3584 partial void OnPhoneChanged();
\r
3585 partial void OnPhoneChanging(string value);
\r
3586 partial void OnPostalCodeChanged();
\r
3587 partial void OnPostalCodeChanging(string value);
\r
3588 partial void OnRegionChanged();
\r
3589 partial void OnRegionChanging(string value);
\r
3590 partial void OnSupplierIDChanged();
\r
3591 partial void OnSupplierIDChanging(int value);
\r
3595 #region string Address
\r
3597 private string _address;
\r
3598 [DebuggerNonUserCode]
\r
3599 [Column(Storage = "_address", Name = "Address", DbType = "nvarchar (60)", AutoSync = AutoSync.Never)]
\r
3600 public string Address
\r
3608 if (value != _address)
\r
3610 OnAddressChanging(value);
\r
3611 SendPropertyChanging();
\r
3613 SendPropertyChanged("Address");
\r
3614 OnAddressChanged();
\r
3621 #region string City
\r
3623 private string _city;
\r
3624 [DebuggerNonUserCode]
\r
3625 [Column(Storage = "_city", Name = "City", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
3626 public string City
\r
3634 if (value != _city)
\r
3636 OnCityChanging(value);
\r
3637 SendPropertyChanging();
\r
3639 SendPropertyChanged("City");
\r
3647 #region string CompanyName
\r
3649 private string _companyName;
\r
3650 [DebuggerNonUserCode]
\r
3651 [Column(Storage = "_companyName", Name = "CompanyName", DbType = "nvarchar (40)", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3652 public string CompanyName
\r
3656 return _companyName;
\r
3660 if (value != _companyName)
\r
3662 OnCompanyNameChanging(value);
\r
3663 SendPropertyChanging();
\r
3664 _companyName = value;
\r
3665 SendPropertyChanged("CompanyName");
\r
3666 OnCompanyNameChanged();
\r
3673 #region string ContactName
\r
3675 private string _contactName;
\r
3676 [DebuggerNonUserCode]
\r
3677 [Column(Storage = "_contactName", Name = "ContactName", DbType = "nvarchar (30)", AutoSync = AutoSync.Never)]
\r
3678 public string ContactName
\r
3682 return _contactName;
\r
3686 if (value != _contactName)
\r
3688 OnContactNameChanging(value);
\r
3689 SendPropertyChanging();
\r
3690 _contactName = value;
\r
3691 SendPropertyChanged("ContactName");
\r
3692 OnContactNameChanged();
\r
3699 #region string ContactTitle
\r
3701 private string _contactTitle;
\r
3702 [DebuggerNonUserCode]
\r
3703 [Column(Storage = "_contactTitle", Name = "ContactTitle", DbType = "nvarchar (30)", AutoSync = AutoSync.Never)]
\r
3704 public string ContactTitle
\r
3708 return _contactTitle;
\r
3712 if (value != _contactTitle)
\r
3714 OnContactTitleChanging(value);
\r
3715 SendPropertyChanging();
\r
3716 _contactTitle = value;
\r
3717 SendPropertyChanged("ContactTitle");
\r
3718 OnContactTitleChanged();
\r
3725 #region string Country
\r
3727 private string _country;
\r
3728 [DebuggerNonUserCode]
\r
3729 [Column(Storage = "_country", Name = "Country", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
3730 public string Country
\r
3738 if (value != _country)
\r
3740 OnCountryChanging(value);
\r
3741 SendPropertyChanging();
\r
3743 SendPropertyChanged("Country");
\r
3744 OnCountryChanged();
\r
3751 #region string Fax
\r
3753 private string _fax;
\r
3754 [DebuggerNonUserCode]
\r
3755 [Column(Storage = "_fax", Name = "Fax", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
3764 if (value != _fax)
\r
3766 OnFaxChanging(value);
\r
3767 SendPropertyChanging();
\r
3769 SendPropertyChanged("Fax");
\r
3777 #region string HomePage
\r
3779 private string _homePage;
\r
3780 [DebuggerNonUserCode]
\r
3781 [Column(Storage = "_homePage", Name = "HomePage", DbType = "ntext", AutoSync = AutoSync.Never)]
\r
3782 public string HomePage
\r
3790 if (value != _homePage)
\r
3792 OnHomePageChanging(value);
\r
3793 SendPropertyChanging();
\r
3794 _homePage = value;
\r
3795 SendPropertyChanged("HomePage");
\r
3796 OnHomePageChanged();
\r
3803 #region string Phone
\r
3805 private string _phone;
\r
3806 [DebuggerNonUserCode]
\r
3807 [Column(Storage = "_phone", Name = "Phone", DbType = "nvarchar (24)", AutoSync = AutoSync.Never)]
\r
3808 public string Phone
\r
3816 if (value != _phone)
\r
3818 OnPhoneChanging(value);
\r
3819 SendPropertyChanging();
\r
3821 SendPropertyChanged("Phone");
\r
3829 #region string PostalCode
\r
3831 private string _postalCode;
\r
3832 [DebuggerNonUserCode]
\r
3833 [Column(Storage = "_postalCode", Name = "PostalCode", DbType = "nvarchar (10)", AutoSync = AutoSync.Never)]
\r
3834 public string PostalCode
\r
3838 return _postalCode;
\r
3842 if (value != _postalCode)
\r
3844 OnPostalCodeChanging(value);
\r
3845 SendPropertyChanging();
\r
3846 _postalCode = value;
\r
3847 SendPropertyChanged("PostalCode");
\r
3848 OnPostalCodeChanged();
\r
3855 #region string Region
\r
3857 private string _region;
\r
3858 [DebuggerNonUserCode]
\r
3859 [Column(Storage = "_region", Name = "Region", DbType = "nvarchar (15)", AutoSync = AutoSync.Never)]
\r
3860 public string Region
\r
3868 if (value != _region)
\r
3870 OnRegionChanging(value);
\r
3871 SendPropertyChanging();
\r
3873 SendPropertyChanged("Region");
\r
3874 OnRegionChanged();
\r
3881 #region int SupplierID
\r
3883 private int _supplierID;
\r
3884 [DebuggerNonUserCode]
\r
3885 [Column(Storage = "_supplierID", Name = "SupplierID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
3886 public int SupplierID
\r
3890 return _supplierID;
\r
3894 if (value != _supplierID)
\r
3896 OnSupplierIDChanging(value);
\r
3897 SendPropertyChanging();
\r
3898 _supplierID = value;
\r
3899 SendPropertyChanged("SupplierID");
\r
3900 OnSupplierIDChanged();
\r
3909 private EntitySet<Product> _products;
\r
3910 [Association(Storage = "_products", OtherKey = "SupplierID", ThisKey = "SupplierID", Name = "fk_Products_0")]
\r
3911 [DebuggerNonUserCode]
\r
3912 public EntitySet<Product> Products
\r
3920 _products = value;
\r
3927 #region Attachement handlers
\r
3929 private void Products_Attach(Product entity)
\r
3931 entity.Supplier = this;
\r
3934 private void Products_Detach(Product entity)
\r
3936 entity.Supplier = null;
\r
3946 _products = new EntitySet<Product>(Products_Attach, Products_Detach);
\r
3954 [Table(Name = "main.Territories")]
\r
3955 public partial class Territory : INotifyPropertyChanging, INotifyPropertyChanged
\r
3957 #region INotifyPropertyChanging handling
\r
3959 public event PropertyChangingEventHandler PropertyChanging;
\r
3961 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs("");
\r
3962 protected virtual void SendPropertyChanging()
\r
3964 if (PropertyChanging != null)
\r
3966 PropertyChanging(this, emptyChangingEventArgs);
\r
3972 #region INotifyPropertyChanged handling
\r
3974 public event PropertyChangedEventHandler PropertyChanged;
\r
3976 protected virtual void SendPropertyChanged(string propertyName)
\r
3978 if (PropertyChanged != null)
\r
3980 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
\r
3986 #region Extensibility Method Definitions
\r
3988 partial void OnCreated();
\r
3989 partial void OnRegionIDChanged();
\r
3990 partial void OnRegionIDChanging(int value);
\r
3991 partial void OnTerritoryDescriptionChanged();
\r
3992 partial void OnTerritoryDescriptionChanging(string value);
\r
3993 partial void OnTerritoryIDChanged();
\r
3994 partial void OnTerritoryIDChanging(string value);
\r
3998 #region int RegionID
\r
4000 private int _regionID;
\r
4001 [DebuggerNonUserCode]
\r
4002 [Column(Storage = "_regionID", Name = "RegionID", DbType = "INTEGER", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
4003 public int RegionID
\r
4011 if (value != _regionID)
\r
4013 if (_region.HasLoadedOrAssignedValue)
\r
4015 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
4017 OnRegionIDChanging(value);
\r
4018 SendPropertyChanging();
\r
4019 _regionID = value;
\r
4020 SendPropertyChanged("RegionID");
\r
4021 OnRegionIDChanged();
\r
4028 #region string TerritoryDescription
\r
4030 private string _territoryDescription;
\r
4031 [DebuggerNonUserCode]
\r
4032 [Column(Storage = "_territoryDescription", Name = "TerritoryDescription", DbType = "nchar", AutoSync = AutoSync.Never, CanBeNull = false)]
\r
4033 public string TerritoryDescription
\r
4037 return _territoryDescription;
\r
4041 if (value != _territoryDescription)
\r
4043 OnTerritoryDescriptionChanging(value);
\r
4044 SendPropertyChanging();
\r
4045 _territoryDescription = value;
\r
4046 SendPropertyChanged("TerritoryDescription");
\r
4047 OnTerritoryDescriptionChanged();
\r
4054 #region string TerritoryID
\r
4056 private string _territoryID;
\r
4057 [DebuggerNonUserCode]
\r
4058 [Column(Storage = "_territoryID", Name = "TerritoryID", DbType = "nvarchar", IsPrimaryKey = true, AutoSync = AutoSync.Never, CanBeNull = false)]
\r
4059 public string TerritoryID
\r
4063 return _territoryID;
\r
4067 if (value != _territoryID)
\r
4069 OnTerritoryIDChanging(value);
\r
4070 SendPropertyChanging();
\r
4071 _territoryID = value;
\r
4072 SendPropertyChanged("TerritoryID");
\r
4073 OnTerritoryIDChanged();
\r
4082 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
4083 [Association(Storage = "_employeeTerritories", OtherKey = "TerritoryID", ThisKey = "TerritoryID", Name = "fk_EmployeeTerritories_0")]
\r
4084 [DebuggerNonUserCode]
\r
4085 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
4089 return _employeeTerritories;
\r
4093 _employeeTerritories = value;
\r
4102 private EntityRef<Region> _region;
\r
4103 [Association(Storage = "_region", OtherKey = "RegionID", ThisKey = "RegionID", Name = "fk_Territories_0", IsForeignKey = true)]
\r
4104 [DebuggerNonUserCode]
\r
4105 public Region Region
\r
4109 return _region.Entity;
\r
4113 if (value != _region.Entity)
\r
4115 if (_region.Entity != null)
\r
4117 var previousRegion = _region.Entity;
\r
4118 _region.Entity = null;
\r
4119 previousRegion.Territories.Remove(this);
\r
4121 _region.Entity = value;
\r
4122 if (value != null)
\r
4124 value.Territories.Add(this);
\r
4125 _regionID = value.RegionID;
\r
4129 _regionID = default(int);
\r
4138 #region Attachement handlers
\r
4140 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
4142 entity.Territory = this;
\r
4145 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
4147 entity.Territory = null;
\r
4155 public Territory()
\r
4157 _employeeTerritories = new EntitySet<EmployeeTerritory>(EmployeeTerritories_Attach, EmployeeTerritories_Detach);
\r
4158 _region = new EntityRef<Region>();
\r