3 // | _ \| |__ | \/ | ___| |_ __ _| |
\r
4 // | | | | '_ \| |\/| |/ _ \ __/ _` | |
\r
5 // | |_| | |_) | | | | __/ || (_| | |
\r
6 // |____/|_.__/|_| |_|\___|\__\__,_|_|
\r
8 // Auto-generated from Northwind on [TIMESTAMP].
\r
9 // Please visit http://code.google.com/p/dblinq2007/ for more information.
\r
14 using System.ComponentModel;
\r
17 using System.Data.Linq;
\r
18 #else // MONO_STRICT
\r
19 using DbLinq.Data.Linq;
\r
20 using DbLinq.Vendor;
\r
21 #endif // MONO_STRICT
\r
22 using System.Data.Linq.Mapping;
\r
23 using System.Diagnostics;
\r
26 public partial class Northwind : DataContext
\r
29 #region Extensibility Method Declarations
\r
30 partial void OnCreated();
\r
34 public Northwind(string connectionString) :
\r
35 base(connectionString)
\r
40 public Northwind(string connection, MappingSource mappingSource) :
\r
41 base(connection, mappingSource)
\r
46 public Northwind(IDbConnection connection, MappingSource mappingSource) :
\r
47 base(connection, mappingSource)
\r
52 public Table<Category> Categories
\r
56 return this.GetTable<Category>();
\r
60 public Table<Customer> Customers
\r
64 return this.GetTable<Customer>();
\r
68 public Table<CustomerCustomerDemo> CustomerCustomerDemo
\r
72 return this.GetTable<CustomerCustomerDemo>();
\r
76 public Table<CustomerDemographic> CustomerDemographics
\r
80 return this.GetTable<CustomerDemographic>();
\r
84 public Table<Employee> Employees
\r
88 return this.GetTable<Employee>();
\r
92 public Table<EmployeeTerritory> EmployeeTerritories
\r
96 return this.GetTable<EmployeeTerritory>();
\r
100 public Table<Order> Orders
\r
104 return this.GetTable<Order>();
\r
108 public Table<OrderDetail> OrderDetails
\r
112 return this.GetTable<OrderDetail>();
\r
116 public Table<Product> Products
\r
120 return this.GetTable<Product>();
\r
124 public Table<Region> Regions
\r
128 return this.GetTable<Region>();
\r
132 public Table<Shipper> Shippers
\r
136 return this.GetTable<Shipper>();
\r
140 public Table<Supplier> Suppliers
\r
144 return this.GetTable<Supplier>();
\r
148 public Table<Territory> Territories
\r
152 return this.GetTable<Territory>();
\r
157 #region Start MONO_STRICT
\r
160 public partial class Northwind
\r
163 public Northwind(IDbConnection connection) :
\r
169 #region End MONO_STRICT
\r
171 #else // MONO_STRICT
\r
173 public partial class Northwind
\r
176 public Northwind(IDbConnection connection) :
\r
177 base(connection, new DbLinq.Sqlite.SqliteVendor())
\r
182 public Northwind(IDbConnection connection, IVendor sqlDialect) :
\r
183 base(connection, sqlDialect)
\r
188 public Northwind(IDbConnection connection, MappingSource mappingSource, IVendor sqlDialect) :
\r
189 base(connection, mappingSource, sqlDialect)
\r
194 #region End Not MONO_STRICT
\r
196 #endif // MONO_STRICT
\r
199 [Table(Name="Categories")]
\r
200 public partial class Category : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Category>
\r
203 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
205 private long _categoryID;
\r
207 private string _categoryName;
\r
209 private string _description;
\r
211 private byte[] _picture;
\r
213 private EntitySet<Product> _products;
\r
215 #region Extensibility Method Declarations
\r
216 partial void OnCreated();
\r
218 partial void OnCategoryIDChanged();
\r
220 partial void OnCategoryIDChanging(long value);
\r
222 partial void OnCategoryNameChanged();
\r
224 partial void OnCategoryNameChanging(string value);
\r
226 partial void OnDescriptionChanged();
\r
228 partial void OnDescriptionChanging(string value);
\r
230 partial void OnPictureChanged();
\r
232 partial void OnPictureChanging(byte[] value);
\r
238 _products = new EntitySet<Product>(new Action<Product>(this.Products_Attach), new Action<Product>(this.Products_Detach));
\r
242 [Column(Storage="_categoryID", Name="CategoryID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
243 [DebuggerNonUserCode()]
\r
244 public long CategoryID
\r
248 return this._categoryID;
\r
252 if ((_categoryID != value))
\r
254 this.OnCategoryIDChanging(value);
\r
255 this.SendPropertyChanging();
\r
256 this._categoryID = value;
\r
257 this.SendPropertyChanged("CategoryID");
\r
258 this.OnCategoryIDChanged();
\r
263 [Column(Storage="_categoryName", Name="CategoryName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
264 [DebuggerNonUserCode()]
\r
265 public string CategoryName
\r
269 return this._categoryName;
\r
273 if (((_categoryName == value)
\r
276 this.OnCategoryNameChanging(value);
\r
277 this.SendPropertyChanging();
\r
278 this._categoryName = value;
\r
279 this.SendPropertyChanged("CategoryName");
\r
280 this.OnCategoryNameChanged();
\r
285 [Column(Storage="_description", Name="Description", DbType="ntext", AutoSync=AutoSync.Never)]
\r
286 [DebuggerNonUserCode()]
\r
287 public string Description
\r
291 return this._description;
\r
295 if (((_description == value)
\r
298 this.OnDescriptionChanging(value);
\r
299 this.SendPropertyChanging();
\r
300 this._description = value;
\r
301 this.SendPropertyChanged("Description");
\r
302 this.OnDescriptionChanged();
\r
307 [Column(Storage="_picture", Name="Picture", DbType="image", AutoSync=AutoSync.Never)]
\r
308 [DebuggerNonUserCode()]
\r
309 public byte[] Picture
\r
313 return this._picture;
\r
317 if (((_picture == value)
\r
320 this.OnPictureChanging(value);
\r
321 this.SendPropertyChanging();
\r
322 this._picture = value;
\r
323 this.SendPropertyChanged("Picture");
\r
324 this.OnPictureChanged();
\r
330 [Association(Storage="_products", OtherKey="CategoryID", ThisKey="CategoryID", Name="FK_Products_1")]
\r
331 [DebuggerNonUserCode()]
\r
332 public EntitySet<Product> Products
\r
336 return this._products;
\r
340 this._products = value;
\r
345 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
347 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
349 protected virtual void SendPropertyChanging()
\r
351 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
354 h(this, emptyChangingEventArgs);
\r
358 protected virtual void SendPropertyChanged(string propertyName)
\r
360 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
363 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
367 public override int GetHashCode()
\r
371 | (_categoryID.GetHashCode() * 1));
\r
375 public override bool Equals(object value)
\r
377 if ((value == null))
\r
381 if (((value.GetType() == this.GetType())
\r
386 Category other = ((Category)(value));
\r
387 return this.Equals(other);
\r
390 public virtual bool Equals(Category value)
\r
392 if ((value == null))
\r
396 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._categoryID, value._categoryID);
\r
399 #region Attachment handlers
\r
400 private void Products_Attach(Product entity)
\r
402 this.SendPropertyChanging();
\r
403 entity.Category = this;
\r
406 private void Products_Detach(Product entity)
\r
408 this.SendPropertyChanging();
\r
409 entity.Category = null;
\r
414 [Table(Name="Customers")]
\r
415 public partial class Customer : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Customer>
\r
418 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
420 private string _address;
\r
422 private string _city;
\r
424 private string _companyName;
\r
426 private string _contactName;
\r
428 private string _contactTitle;
\r
430 private string _country;
\r
432 private string _customerID;
\r
434 private string _fax;
\r
436 private string _phone;
\r
438 private string _postalCode;
\r
440 private string _region;
\r
442 private EntitySet<Order> _orders;
\r
444 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
446 #region Extensibility Method Declarations
\r
447 partial void OnCreated();
\r
449 partial void OnAddressChanged();
\r
451 partial void OnAddressChanging(string value);
\r
453 partial void OnCityChanged();
\r
455 partial void OnCityChanging(string value);
\r
457 partial void OnCompanyNameChanged();
\r
459 partial void OnCompanyNameChanging(string value);
\r
461 partial void OnContactNameChanged();
\r
463 partial void OnContactNameChanging(string value);
\r
465 partial void OnContactTitleChanged();
\r
467 partial void OnContactTitleChanging(string value);
\r
469 partial void OnCountryChanged();
\r
471 partial void OnCountryChanging(string value);
\r
473 partial void OnCustomerIDChanged();
\r
475 partial void OnCustomerIDChanging(string value);
\r
477 partial void OnFaxChanged();
\r
479 partial void OnFaxChanging(string value);
\r
481 partial void OnPhoneChanged();
\r
483 partial void OnPhoneChanging(string value);
\r
485 partial void OnPostalCodeChanged();
\r
487 partial void OnPostalCodeChanging(string value);
\r
489 partial void OnRegionChanged();
\r
491 partial void OnRegionChanging(string value);
\r
497 _orders = new EntitySet<Order>(new Action<Order>(this.Orders_Attach), new Action<Order>(this.Orders_Detach));
\r
498 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(new Action<CustomerCustomerDemo>(this.CustomerCustomerDemo_Attach), new Action<CustomerCustomerDemo>(this.CustomerCustomerDemo_Detach));
\r
502 [Column(Storage="_address", Name="Address", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
503 [DebuggerNonUserCode()]
\r
504 public string Address
\r
508 return this._address;
\r
512 if (((_address == value)
\r
515 this.OnAddressChanging(value);
\r
516 this.SendPropertyChanging();
\r
517 this._address = value;
\r
518 this.SendPropertyChanged("Address");
\r
519 this.OnAddressChanged();
\r
524 [Column(Storage="_city", Name="City", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
525 [DebuggerNonUserCode()]
\r
534 if (((_city == value)
\r
537 this.OnCityChanging(value);
\r
538 this.SendPropertyChanging();
\r
539 this._city = value;
\r
540 this.SendPropertyChanged("City");
\r
541 this.OnCityChanged();
\r
546 [Column(Storage="_companyName", Name="CompanyName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
547 [DebuggerNonUserCode()]
\r
548 public string CompanyName
\r
552 return this._companyName;
\r
556 if (((_companyName == value)
\r
559 this.OnCompanyNameChanging(value);
\r
560 this.SendPropertyChanging();
\r
561 this._companyName = value;
\r
562 this.SendPropertyChanged("CompanyName");
\r
563 this.OnCompanyNameChanged();
\r
568 [Column(Storage="_contactName", Name="ContactName", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
569 [DebuggerNonUserCode()]
\r
570 public string ContactName
\r
574 return this._contactName;
\r
578 if (((_contactName == value)
\r
581 this.OnContactNameChanging(value);
\r
582 this.SendPropertyChanging();
\r
583 this._contactName = value;
\r
584 this.SendPropertyChanged("ContactName");
\r
585 this.OnContactNameChanged();
\r
590 [Column(Storage="_contactTitle", Name="ContactTitle", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
591 [DebuggerNonUserCode()]
\r
592 public string ContactTitle
\r
596 return this._contactTitle;
\r
600 if (((_contactTitle == value)
\r
603 this.OnContactTitleChanging(value);
\r
604 this.SendPropertyChanging();
\r
605 this._contactTitle = value;
\r
606 this.SendPropertyChanged("ContactTitle");
\r
607 this.OnContactTitleChanged();
\r
612 [Column(Storage="_country", Name="Country", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
613 [DebuggerNonUserCode()]
\r
614 public string Country
\r
618 return this._country;
\r
622 if (((_country == value)
\r
625 this.OnCountryChanging(value);
\r
626 this.SendPropertyChanging();
\r
627 this._country = value;
\r
628 this.SendPropertyChanged("Country");
\r
629 this.OnCountryChanged();
\r
634 [Column(Storage="_customerID", Name="CustomerID", DbType="nchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
635 [DebuggerNonUserCode()]
\r
636 public string CustomerID
\r
640 return this._customerID;
\r
644 if (((_customerID == value)
\r
647 this.OnCustomerIDChanging(value);
\r
648 this.SendPropertyChanging();
\r
649 this._customerID = value;
\r
650 this.SendPropertyChanged("CustomerID");
\r
651 this.OnCustomerIDChanged();
\r
656 [Column(Storage="_fax", Name="Fax", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
657 [DebuggerNonUserCode()]
\r
666 if (((_fax == value)
\r
669 this.OnFaxChanging(value);
\r
670 this.SendPropertyChanging();
\r
672 this.SendPropertyChanged("Fax");
\r
673 this.OnFaxChanged();
\r
678 [Column(Storage="_phone", Name="Phone", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
679 [DebuggerNonUserCode()]
\r
680 public string Phone
\r
684 return this._phone;
\r
688 if (((_phone == value)
\r
691 this.OnPhoneChanging(value);
\r
692 this.SendPropertyChanging();
\r
693 this._phone = value;
\r
694 this.SendPropertyChanged("Phone");
\r
695 this.OnPhoneChanged();
\r
700 [Column(Storage="_postalCode", Name="PostalCode", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
701 [DebuggerNonUserCode()]
\r
702 public string PostalCode
\r
706 return this._postalCode;
\r
710 if (((_postalCode == value)
\r
713 this.OnPostalCodeChanging(value);
\r
714 this.SendPropertyChanging();
\r
715 this._postalCode = value;
\r
716 this.SendPropertyChanged("PostalCode");
\r
717 this.OnPostalCodeChanged();
\r
722 [Column(Storage="_region", Name="Region", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
723 [DebuggerNonUserCode()]
\r
724 public string Region
\r
728 return this._region;
\r
732 if (((_region == value)
\r
735 this.OnRegionChanging(value);
\r
736 this.SendPropertyChanging();
\r
737 this._region = value;
\r
738 this.SendPropertyChanged("Region");
\r
739 this.OnRegionChanged();
\r
745 [Association(Storage="_orders", OtherKey="CustomerID", ThisKey="CustomerID", Name="FK_Orders_2")]
\r
746 [DebuggerNonUserCode()]
\r
747 public EntitySet<Order> Orders
\r
751 return this._orders;
\r
755 this._orders = value;
\r
759 [Association(Storage="_customerCustomerDemo", OtherKey="CustomerID", ThisKey="CustomerID", Name="FK_CustomerCustomerDemo_0")]
\r
760 [DebuggerNonUserCode()]
\r
761 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
765 return this._customerCustomerDemo;
\r
769 this._customerCustomerDemo = value;
\r
774 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
776 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
778 protected virtual void SendPropertyChanging()
\r
780 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
783 h(this, emptyChangingEventArgs);
\r
787 protected virtual void SendPropertyChanged(string propertyName)
\r
789 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
792 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
796 public override int GetHashCode()
\r
799 if ((_customerID != null))
\r
802 | (_customerID.GetHashCode() * 1));
\r
807 public override bool Equals(object value)
\r
809 if ((value == null))
\r
813 if (((value.GetType() == this.GetType())
\r
818 Customer other = ((Customer)(value));
\r
819 return this.Equals(other);
\r
822 public virtual bool Equals(Customer value)
\r
824 if ((value == null))
\r
828 return System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._customerID, value._customerID);
\r
831 #region Attachment handlers
\r
832 private void Orders_Attach(Order entity)
\r
834 this.SendPropertyChanging();
\r
835 entity.Customer = this;
\r
838 private void Orders_Detach(Order entity)
\r
840 this.SendPropertyChanging();
\r
841 entity.Customer = null;
\r
844 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
846 this.SendPropertyChanging();
\r
847 entity.Customer = this;
\r
850 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
852 this.SendPropertyChanging();
\r
853 entity.Customer = null;
\r
858 [Table(Name="CustomerCustomerDemo")]
\r
859 public partial class CustomerCustomerDemo : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<CustomerCustomerDemo>
\r
862 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
864 private string _customerID;
\r
866 private string _customerTypeID;
\r
868 private EntityRef<Customer> _customer = new EntityRef<Customer>();
\r
870 private EntityRef<CustomerDemographic> _customerDemographic = new EntityRef<CustomerDemographic>();
\r
872 #region Extensibility Method Declarations
\r
873 partial void OnCreated();
\r
875 partial void OnCustomerIDChanged();
\r
877 partial void OnCustomerIDChanging(string value);
\r
879 partial void OnCustomerTypeIDChanged();
\r
881 partial void OnCustomerTypeIDChanging(string value);
\r
885 public CustomerCustomerDemo()
\r
890 [Column(Storage="_customerID", Name="CustomerID", DbType="nchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
891 [DebuggerNonUserCode()]
\r
892 public string CustomerID
\r
896 return this._customerID;
\r
900 if (((_customerID == value)
\r
903 if (_customer.HasLoadedOrAssignedValue)
\r
905 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
907 this.OnCustomerIDChanging(value);
\r
908 this.SendPropertyChanging();
\r
909 this._customerID = value;
\r
910 this.SendPropertyChanged("CustomerID");
\r
911 this.OnCustomerIDChanged();
\r
916 [Column(Storage="_customerTypeID", Name="CustomerTypeID", DbType="nchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
917 [DebuggerNonUserCode()]
\r
918 public string CustomerTypeID
\r
922 return this._customerTypeID;
\r
926 if (((_customerTypeID == value)
\r
929 if (_customerDemographic.HasLoadedOrAssignedValue)
\r
931 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
933 this.OnCustomerTypeIDChanging(value);
\r
934 this.SendPropertyChanging();
\r
935 this._customerTypeID = value;
\r
936 this.SendPropertyChanged("CustomerTypeID");
\r
937 this.OnCustomerTypeIDChanged();
\r
943 [Association(Storage="_customer", OtherKey="CustomerID", ThisKey="CustomerID", Name="FK_CustomerCustomerDemo_0", IsForeignKey=true)]
\r
944 [DebuggerNonUserCode()]
\r
945 public Customer Customer
\r
949 return this._customer.Entity;
\r
953 if (((this._customer.Entity == value)
\r
956 if ((this._customer.Entity != null))
\r
958 Customer previousCustomer = this._customer.Entity;
\r
959 this._customer.Entity = null;
\r
960 previousCustomer.CustomerCustomerDemo.Remove(this);
\r
962 this._customer.Entity = value;
\r
963 if ((value != null))
\r
965 value.CustomerCustomerDemo.Add(this);
\r
966 _customerID = value.CustomerID;
\r
970 _customerID = default(string);
\r
976 [Association(Storage="_customerDemographic", OtherKey="CustomerTypeID", ThisKey="CustomerTypeID", Name="FK_CustomerCustomerDemo_1", IsForeignKey=true)]
\r
977 [DebuggerNonUserCode()]
\r
978 public CustomerDemographic CustomerDemographic
\r
982 return this._customerDemographic.Entity;
\r
986 if (((this._customerDemographic.Entity == value)
\r
989 if ((this._customerDemographic.Entity != null))
\r
991 CustomerDemographic previousCustomerDemographic = this._customerDemographic.Entity;
\r
992 this._customerDemographic.Entity = null;
\r
993 previousCustomerDemographic.CustomerCustomerDemo.Remove(this);
\r
995 this._customerDemographic.Entity = value;
\r
996 if ((value != null))
\r
998 value.CustomerCustomerDemo.Add(this);
\r
999 _customerTypeID = value.CustomerTypeID;
\r
1003 _customerTypeID = default(string);
\r
1010 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
1012 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
1014 protected virtual void SendPropertyChanging()
\r
1016 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
1019 h(this, emptyChangingEventArgs);
\r
1023 protected virtual void SendPropertyChanged(string propertyName)
\r
1025 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
1028 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
1032 public override int GetHashCode()
\r
1035 if ((_customerID != null))
\r
1038 | (_customerID.GetHashCode() * 1));
\r
1040 if ((_customerTypeID != null))
\r
1043 | (_customerTypeID.GetHashCode() * 65536));
\r
1048 public override bool Equals(object value)
\r
1050 if ((value == null))
\r
1054 if (((value.GetType() == this.GetType())
\r
1059 CustomerCustomerDemo other = ((CustomerCustomerDemo)(value));
\r
1060 return this.Equals(other);
\r
1063 public virtual bool Equals(CustomerCustomerDemo value)
\r
1065 if ((value == null))
\r
1069 return (System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._customerID, value._customerID) && System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._customerTypeID, value._customerTypeID));
\r
1073 [Table(Name="CustomerDemographics")]
\r
1074 public partial class CustomerDemographic : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<CustomerDemographic>
\r
1077 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
1079 private string _customerDesc;
\r
1081 private string _customerTypeID;
\r
1083 private EntitySet<CustomerCustomerDemo> _customerCustomerDemo;
\r
1085 #region Extensibility Method Declarations
\r
1086 partial void OnCreated();
\r
1088 partial void OnCustomerDescChanged();
\r
1090 partial void OnCustomerDescChanging(string value);
\r
1092 partial void OnCustomerTypeIDChanged();
\r
1094 partial void OnCustomerTypeIDChanging(string value);
\r
1098 public CustomerDemographic()
\r
1100 _customerCustomerDemo = new EntitySet<CustomerCustomerDemo>(new Action<CustomerCustomerDemo>(this.CustomerCustomerDemo_Attach), new Action<CustomerCustomerDemo>(this.CustomerCustomerDemo_Detach));
\r
1104 [Column(Storage="_customerDesc", Name="CustomerDesc", DbType="ntext", AutoSync=AutoSync.Never)]
\r
1105 [DebuggerNonUserCode()]
\r
1106 public string CustomerDesc
\r
1110 return this._customerDesc;
\r
1114 if (((_customerDesc == value)
\r
1117 this.OnCustomerDescChanging(value);
\r
1118 this.SendPropertyChanging();
\r
1119 this._customerDesc = value;
\r
1120 this.SendPropertyChanged("CustomerDesc");
\r
1121 this.OnCustomerDescChanged();
\r
1126 [Column(Storage="_customerTypeID", Name="CustomerTypeID", DbType="nchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1127 [DebuggerNonUserCode()]
\r
1128 public string CustomerTypeID
\r
1132 return this._customerTypeID;
\r
1136 if (((_customerTypeID == value)
\r
1139 this.OnCustomerTypeIDChanging(value);
\r
1140 this.SendPropertyChanging();
\r
1141 this._customerTypeID = value;
\r
1142 this.SendPropertyChanged("CustomerTypeID");
\r
1143 this.OnCustomerTypeIDChanged();
\r
1149 [Association(Storage="_customerCustomerDemo", OtherKey="CustomerTypeID", ThisKey="CustomerTypeID", Name="FK_CustomerCustomerDemo_1")]
\r
1150 [DebuggerNonUserCode()]
\r
1151 public EntitySet<CustomerCustomerDemo> CustomerCustomerDemo
\r
1155 return this._customerCustomerDemo;
\r
1159 this._customerCustomerDemo = value;
\r
1164 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
1166 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
1168 protected virtual void SendPropertyChanging()
\r
1170 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
1173 h(this, emptyChangingEventArgs);
\r
1177 protected virtual void SendPropertyChanged(string propertyName)
\r
1179 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
1182 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
1186 public override int GetHashCode()
\r
1189 if ((_customerTypeID != null))
\r
1192 | (_customerTypeID.GetHashCode() * 1));
\r
1197 public override bool Equals(object value)
\r
1199 if ((value == null))
\r
1203 if (((value.GetType() == this.GetType())
\r
1208 CustomerDemographic other = ((CustomerDemographic)(value));
\r
1209 return this.Equals(other);
\r
1212 public virtual bool Equals(CustomerDemographic value)
\r
1214 if ((value == null))
\r
1218 return System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._customerTypeID, value._customerTypeID);
\r
1221 #region Attachment handlers
\r
1222 private void CustomerCustomerDemo_Attach(CustomerCustomerDemo entity)
\r
1224 this.SendPropertyChanging();
\r
1225 entity.CustomerDemographic = this;
\r
1228 private void CustomerCustomerDemo_Detach(CustomerCustomerDemo entity)
\r
1230 this.SendPropertyChanging();
\r
1231 entity.CustomerDemographic = null;
\r
1236 [Table(Name="Employees")]
\r
1237 public partial class Employee : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Employee>
\r
1240 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
1242 private string _address;
\r
1244 private System.Nullable<System.DateTime> _birthDate;
\r
1246 private string _city;
\r
1248 private string _country;
\r
1250 private long _employeeID;
\r
1252 private string _extension;
\r
1254 private string _firstName;
\r
1256 private System.Nullable<System.DateTime> _hireDate;
\r
1258 private string _homePhone;
\r
1260 private string _lastName;
\r
1262 private string _notes;
\r
1264 private byte[] _photo;
\r
1266 private string _photoPath;
\r
1268 private string _postalCode;
\r
1270 private string _region;
\r
1272 private System.Nullable<long> _reportsTo;
\r
1274 private string _title;
\r
1276 private string _titleOfCourtesy;
\r
1278 private EntitySet<Employee> _employees;
\r
1280 private EntitySet<Order> _orders;
\r
1282 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
1284 private EntityRef<Employee> _reportsToEmployee = new EntityRef<Employee>();
\r
1286 #region Extensibility Method Declarations
\r
1287 partial void OnCreated();
\r
1289 partial void OnAddressChanged();
\r
1291 partial void OnAddressChanging(string value);
\r
1293 partial void OnBirthDateChanged();
\r
1295 partial void OnBirthDateChanging(System.Nullable<System.DateTime> value);
\r
1297 partial void OnCityChanged();
\r
1299 partial void OnCityChanging(string value);
\r
1301 partial void OnCountryChanged();
\r
1303 partial void OnCountryChanging(string value);
\r
1305 partial void OnEmployeeIDChanged();
\r
1307 partial void OnEmployeeIDChanging(long value);
\r
1309 partial void OnExtensionChanged();
\r
1311 partial void OnExtensionChanging(string value);
\r
1313 partial void OnFirstNameChanged();
\r
1315 partial void OnFirstNameChanging(string value);
\r
1317 partial void OnHireDateChanged();
\r
1319 partial void OnHireDateChanging(System.Nullable<System.DateTime> value);
\r
1321 partial void OnHomePhoneChanged();
\r
1323 partial void OnHomePhoneChanging(string value);
\r
1325 partial void OnLastNameChanged();
\r
1327 partial void OnLastNameChanging(string value);
\r
1329 partial void OnNotesChanged();
\r
1331 partial void OnNotesChanging(string value);
\r
1333 partial void OnPhotoChanged();
\r
1335 partial void OnPhotoChanging(byte[] value);
\r
1337 partial void OnPhotoPathChanged();
\r
1339 partial void OnPhotoPathChanging(string value);
\r
1341 partial void OnPostalCodeChanged();
\r
1343 partial void OnPostalCodeChanging(string value);
\r
1345 partial void OnRegionChanged();
\r
1347 partial void OnRegionChanging(string value);
\r
1349 partial void OnReportsToChanged();
\r
1351 partial void OnReportsToChanging(System.Nullable<long> value);
\r
1353 partial void OnTitleChanged();
\r
1355 partial void OnTitleChanging(string value);
\r
1357 partial void OnTitleOfCourtesyChanged();
\r
1359 partial void OnTitleOfCourtesyChanging(string value);
\r
1365 _employees = new EntitySet<Employee>(new Action<Employee>(this.Employees_Attach), new Action<Employee>(this.Employees_Detach));
\r
1366 _orders = new EntitySet<Order>(new Action<Order>(this.Orders_Attach), new Action<Order>(this.Orders_Detach));
\r
1367 _employeeTerritories = new EntitySet<EmployeeTerritory>(new Action<EmployeeTerritory>(this.EmployeeTerritories_Attach), new Action<EmployeeTerritory>(this.EmployeeTerritories_Detach));
\r
1371 [Column(Storage="_address", Name="Address", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1372 [DebuggerNonUserCode()]
\r
1373 public string Address
\r
1377 return this._address;
\r
1381 if (((_address == value)
\r
1384 this.OnAddressChanging(value);
\r
1385 this.SendPropertyChanging();
\r
1386 this._address = value;
\r
1387 this.SendPropertyChanged("Address");
\r
1388 this.OnAddressChanged();
\r
1393 [Column(Storage="_birthDate", Name="BirthDate", DbType="datetime", AutoSync=AutoSync.Never)]
\r
1394 [DebuggerNonUserCode()]
\r
1395 public System.Nullable<System.DateTime> BirthDate
\r
1399 return this._birthDate;
\r
1403 if ((_birthDate != value))
\r
1405 this.OnBirthDateChanging(value);
\r
1406 this.SendPropertyChanging();
\r
1407 this._birthDate = value;
\r
1408 this.SendPropertyChanged("BirthDate");
\r
1409 this.OnBirthDateChanged();
\r
1414 [Column(Storage="_city", Name="City", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1415 [DebuggerNonUserCode()]
\r
1416 public string City
\r
1420 return this._city;
\r
1424 if (((_city == value)
\r
1427 this.OnCityChanging(value);
\r
1428 this.SendPropertyChanging();
\r
1429 this._city = value;
\r
1430 this.SendPropertyChanged("City");
\r
1431 this.OnCityChanged();
\r
1436 [Column(Storage="_country", Name="Country", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1437 [DebuggerNonUserCode()]
\r
1438 public string Country
\r
1442 return this._country;
\r
1446 if (((_country == value)
\r
1449 this.OnCountryChanging(value);
\r
1450 this.SendPropertyChanging();
\r
1451 this._country = value;
\r
1452 this.SendPropertyChanged("Country");
\r
1453 this.OnCountryChanged();
\r
1458 [Column(Storage="_employeeID", Name="EmployeeID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1459 [DebuggerNonUserCode()]
\r
1460 public long EmployeeID
\r
1464 return this._employeeID;
\r
1468 if ((_employeeID != value))
\r
1470 this.OnEmployeeIDChanging(value);
\r
1471 this.SendPropertyChanging();
\r
1472 this._employeeID = value;
\r
1473 this.SendPropertyChanged("EmployeeID");
\r
1474 this.OnEmployeeIDChanged();
\r
1479 [Column(Storage="_extension", Name="Extension", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1480 [DebuggerNonUserCode()]
\r
1481 public string Extension
\r
1485 return this._extension;
\r
1489 if (((_extension == value)
\r
1492 this.OnExtensionChanging(value);
\r
1493 this.SendPropertyChanging();
\r
1494 this._extension = value;
\r
1495 this.SendPropertyChanged("Extension");
\r
1496 this.OnExtensionChanged();
\r
1501 [Column(Storage="_firstName", Name="FirstName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1502 [DebuggerNonUserCode()]
\r
1503 public string FirstName
\r
1507 return this._firstName;
\r
1511 if (((_firstName == value)
\r
1514 this.OnFirstNameChanging(value);
\r
1515 this.SendPropertyChanging();
\r
1516 this._firstName = value;
\r
1517 this.SendPropertyChanged("FirstName");
\r
1518 this.OnFirstNameChanged();
\r
1523 [Column(Storage="_hireDate", Name="HireDate", DbType="datetime", AutoSync=AutoSync.Never)]
\r
1524 [DebuggerNonUserCode()]
\r
1525 public System.Nullable<System.DateTime> HireDate
\r
1529 return this._hireDate;
\r
1533 if ((_hireDate != value))
\r
1535 this.OnHireDateChanging(value);
\r
1536 this.SendPropertyChanging();
\r
1537 this._hireDate = value;
\r
1538 this.SendPropertyChanged("HireDate");
\r
1539 this.OnHireDateChanged();
\r
1544 [Column(Storage="_homePhone", Name="HomePhone", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1545 [DebuggerNonUserCode()]
\r
1546 public string HomePhone
\r
1550 return this._homePhone;
\r
1554 if (((_homePhone == value)
\r
1557 this.OnHomePhoneChanging(value);
\r
1558 this.SendPropertyChanging();
\r
1559 this._homePhone = value;
\r
1560 this.SendPropertyChanged("HomePhone");
\r
1561 this.OnHomePhoneChanged();
\r
1566 [Column(Storage="_lastName", Name="LastName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1567 [DebuggerNonUserCode()]
\r
1568 public string LastName
\r
1572 return this._lastName;
\r
1576 if (((_lastName == value)
\r
1579 this.OnLastNameChanging(value);
\r
1580 this.SendPropertyChanging();
\r
1581 this._lastName = value;
\r
1582 this.SendPropertyChanged("LastName");
\r
1583 this.OnLastNameChanged();
\r
1588 [Column(Storage="_notes", Name="Notes", DbType="ntext", AutoSync=AutoSync.Never)]
\r
1589 [DebuggerNonUserCode()]
\r
1590 public string Notes
\r
1594 return this._notes;
\r
1598 if (((_notes == value)
\r
1601 this.OnNotesChanging(value);
\r
1602 this.SendPropertyChanging();
\r
1603 this._notes = value;
\r
1604 this.SendPropertyChanged("Notes");
\r
1605 this.OnNotesChanged();
\r
1610 [Column(Storage="_photo", Name="Photo", DbType="image", AutoSync=AutoSync.Never)]
\r
1611 [DebuggerNonUserCode()]
\r
1612 public byte[] Photo
\r
1616 return this._photo;
\r
1620 if (((_photo == value)
\r
1623 this.OnPhotoChanging(value);
\r
1624 this.SendPropertyChanging();
\r
1625 this._photo = value;
\r
1626 this.SendPropertyChanged("Photo");
\r
1627 this.OnPhotoChanged();
\r
1632 [Column(Storage="_photoPath", Name="PhotoPath", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1633 [DebuggerNonUserCode()]
\r
1634 public string PhotoPath
\r
1638 return this._photoPath;
\r
1642 if (((_photoPath == value)
\r
1645 this.OnPhotoPathChanging(value);
\r
1646 this.SendPropertyChanging();
\r
1647 this._photoPath = value;
\r
1648 this.SendPropertyChanged("PhotoPath");
\r
1649 this.OnPhotoPathChanged();
\r
1654 [Column(Storage="_postalCode", Name="PostalCode", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1655 [DebuggerNonUserCode()]
\r
1656 public string PostalCode
\r
1660 return this._postalCode;
\r
1664 if (((_postalCode == value)
\r
1667 this.OnPostalCodeChanging(value);
\r
1668 this.SendPropertyChanging();
\r
1669 this._postalCode = value;
\r
1670 this.SendPropertyChanged("PostalCode");
\r
1671 this.OnPostalCodeChanged();
\r
1676 [Column(Storage="_region", Name="Region", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1677 [DebuggerNonUserCode()]
\r
1678 public string Region
\r
1682 return this._region;
\r
1686 if (((_region == value)
\r
1689 this.OnRegionChanging(value);
\r
1690 this.SendPropertyChanging();
\r
1691 this._region = value;
\r
1692 this.SendPropertyChanged("Region");
\r
1693 this.OnRegionChanged();
\r
1698 [Column(Storage="_reportsTo", Name="ReportsTo", DbType="integer", AutoSync=AutoSync.Never)]
\r
1699 [DebuggerNonUserCode()]
\r
1700 public System.Nullable<long> ReportsTo
\r
1704 return this._reportsTo;
\r
1708 if ((_reportsTo != value))
\r
1710 if (_reportsToEmployee.HasLoadedOrAssignedValue)
\r
1712 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1714 this.OnReportsToChanging(value);
\r
1715 this.SendPropertyChanging();
\r
1716 this._reportsTo = value;
\r
1717 this.SendPropertyChanged("ReportsTo");
\r
1718 this.OnReportsToChanged();
\r
1723 [Column(Storage="_title", Name="Title", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1724 [DebuggerNonUserCode()]
\r
1725 public string Title
\r
1729 return this._title;
\r
1733 if (((_title == value)
\r
1736 this.OnTitleChanging(value);
\r
1737 this.SendPropertyChanging();
\r
1738 this._title = value;
\r
1739 this.SendPropertyChanged("Title");
\r
1740 this.OnTitleChanged();
\r
1745 [Column(Storage="_titleOfCourtesy", Name="TitleOfCourtesy", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
1746 [DebuggerNonUserCode()]
\r
1747 public string TitleOfCourtesy
\r
1751 return this._titleOfCourtesy;
\r
1755 if (((_titleOfCourtesy == value)
\r
1758 this.OnTitleOfCourtesyChanging(value);
\r
1759 this.SendPropertyChanging();
\r
1760 this._titleOfCourtesy = value;
\r
1761 this.SendPropertyChanged("TitleOfCourtesy");
\r
1762 this.OnTitleOfCourtesyChanged();
\r
1768 [Association(Storage="_employees", OtherKey="ReportsTo", ThisKey="EmployeeID", Name="FK_Employees_0")]
\r
1769 [DebuggerNonUserCode()]
\r
1770 public EntitySet<Employee> Employees
\r
1774 return this._employees;
\r
1778 this._employees = value;
\r
1782 [Association(Storage="_orders", OtherKey="EmployeeID", ThisKey="EmployeeID", Name="FK_Orders_1")]
\r
1783 [DebuggerNonUserCode()]
\r
1784 public EntitySet<Order> Orders
\r
1788 return this._orders;
\r
1792 this._orders = value;
\r
1796 [Association(Storage="_employeeTerritories", OtherKey="EmployeeID", ThisKey="EmployeeID", Name="FK_EmployeeTerritories_1")]
\r
1797 [DebuggerNonUserCode()]
\r
1798 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
1802 return this._employeeTerritories;
\r
1806 this._employeeTerritories = value;
\r
1812 [Association(Storage="_reportsToEmployee", OtherKey="EmployeeID", ThisKey="ReportsTo", Name="FK_Employees_0", IsForeignKey=true)]
\r
1813 [DebuggerNonUserCode()]
\r
1814 public Employee ReportsToEmployee
\r
1818 return this._reportsToEmployee.Entity;
\r
1822 if (((this._reportsToEmployee.Entity == value)
\r
1825 if ((this._reportsToEmployee.Entity != null))
\r
1827 Employee previousEmployee = this._reportsToEmployee.Entity;
\r
1828 this._reportsToEmployee.Entity = null;
\r
1829 previousEmployee.Employees.Remove(this);
\r
1831 this._reportsToEmployee.Entity = value;
\r
1832 if ((value != null))
\r
1834 value.Employees.Add(this);
\r
1835 _reportsTo = value.EmployeeID;
\r
1839 _reportsTo = null;
\r
1846 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
1848 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
1850 protected virtual void SendPropertyChanging()
\r
1852 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
1855 h(this, emptyChangingEventArgs);
\r
1859 protected virtual void SendPropertyChanged(string propertyName)
\r
1861 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
1864 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
1868 public override int GetHashCode()
\r
1872 | (_employeeID.GetHashCode() * 1));
\r
1876 public override bool Equals(object value)
\r
1878 if ((value == null))
\r
1882 if (((value.GetType() == this.GetType())
\r
1887 Employee other = ((Employee)(value));
\r
1888 return this.Equals(other);
\r
1891 public virtual bool Equals(Employee value)
\r
1893 if ((value == null))
\r
1897 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._employeeID, value._employeeID);
\r
1900 #region Attachment handlers
\r
1901 private void Employees_Attach(Employee entity)
\r
1903 this.SendPropertyChanging();
\r
1904 entity.ReportsToEmployee = this;
\r
1907 private void Employees_Detach(Employee entity)
\r
1909 this.SendPropertyChanging();
\r
1910 entity.ReportsToEmployee = null;
\r
1913 private void Orders_Attach(Order entity)
\r
1915 this.SendPropertyChanging();
\r
1916 entity.Employee = this;
\r
1919 private void Orders_Detach(Order entity)
\r
1921 this.SendPropertyChanging();
\r
1922 entity.Employee = null;
\r
1925 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
1927 this.SendPropertyChanging();
\r
1928 entity.Employee = this;
\r
1931 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
1933 this.SendPropertyChanging();
\r
1934 entity.Employee = null;
\r
1939 [Table(Name="EmployeeTerritories")]
\r
1940 public partial class EmployeeTerritory : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<EmployeeTerritory>
\r
1943 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
1945 private long _employeeID;
\r
1947 private string _territoryID;
\r
1949 private EntityRef<Territory> _territory = new EntityRef<Territory>();
\r
1951 private EntityRef<Employee> _employee = new EntityRef<Employee>();
\r
1953 #region Extensibility Method Declarations
\r
1954 partial void OnCreated();
\r
1956 partial void OnEmployeeIDChanged();
\r
1958 partial void OnEmployeeIDChanging(long value);
\r
1960 partial void OnTerritoryIDChanged();
\r
1962 partial void OnTerritoryIDChanging(string value);
\r
1966 public EmployeeTerritory()
\r
1971 [Column(Storage="_employeeID", Name="EmployeeID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1972 [DebuggerNonUserCode()]
\r
1973 public long EmployeeID
\r
1977 return this._employeeID;
\r
1981 if ((_employeeID != value))
\r
1983 if (_employee.HasLoadedOrAssignedValue)
\r
1985 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
1987 this.OnEmployeeIDChanging(value);
\r
1988 this.SendPropertyChanging();
\r
1989 this._employeeID = value;
\r
1990 this.SendPropertyChanged("EmployeeID");
\r
1991 this.OnEmployeeIDChanged();
\r
1996 [Column(Storage="_territoryID", Name="TerritoryID", DbType="nvarchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
1997 [DebuggerNonUserCode()]
\r
1998 public string TerritoryID
\r
2002 return this._territoryID;
\r
2006 if (((_territoryID == value)
\r
2009 if (_territory.HasLoadedOrAssignedValue)
\r
2011 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2013 this.OnTerritoryIDChanging(value);
\r
2014 this.SendPropertyChanging();
\r
2015 this._territoryID = value;
\r
2016 this.SendPropertyChanged("TerritoryID");
\r
2017 this.OnTerritoryIDChanged();
\r
2023 [Association(Storage="_territory", OtherKey="TerritoryID", ThisKey="TerritoryID", Name="FK_EmployeeTerritories_0", IsForeignKey=true)]
\r
2024 [DebuggerNonUserCode()]
\r
2025 public Territory Territory
\r
2029 return this._territory.Entity;
\r
2033 if (((this._territory.Entity == value)
\r
2036 if ((this._territory.Entity != null))
\r
2038 Territory previousTerritory = this._territory.Entity;
\r
2039 this._territory.Entity = null;
\r
2040 previousTerritory.EmployeeTerritories.Remove(this);
\r
2042 this._territory.Entity = value;
\r
2043 if ((value != null))
\r
2045 value.EmployeeTerritories.Add(this);
\r
2046 _territoryID = value.TerritoryID;
\r
2050 _territoryID = default(string);
\r
2056 [Association(Storage="_employee", OtherKey="EmployeeID", ThisKey="EmployeeID", Name="FK_EmployeeTerritories_1", IsForeignKey=true)]
\r
2057 [DebuggerNonUserCode()]
\r
2058 public Employee Employee
\r
2062 return this._employee.Entity;
\r
2066 if (((this._employee.Entity == value)
\r
2069 if ((this._employee.Entity != null))
\r
2071 Employee previousEmployee = this._employee.Entity;
\r
2072 this._employee.Entity = null;
\r
2073 previousEmployee.EmployeeTerritories.Remove(this);
\r
2075 this._employee.Entity = value;
\r
2076 if ((value != null))
\r
2078 value.EmployeeTerritories.Add(this);
\r
2079 _employeeID = value.EmployeeID;
\r
2083 _employeeID = default(long);
\r
2090 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
2092 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
2094 protected virtual void SendPropertyChanging()
\r
2096 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
2099 h(this, emptyChangingEventArgs);
\r
2103 protected virtual void SendPropertyChanged(string propertyName)
\r
2105 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
2108 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
2112 public override int GetHashCode()
\r
2116 | (_employeeID.GetHashCode() * 1));
\r
2117 if ((_territoryID != null))
\r
2120 | (_territoryID.GetHashCode() * 65536));
\r
2125 public override bool Equals(object value)
\r
2127 if ((value == null))
\r
2131 if (((value.GetType() == this.GetType())
\r
2136 EmployeeTerritory other = ((EmployeeTerritory)(value));
\r
2137 return this.Equals(other);
\r
2140 public virtual bool Equals(EmployeeTerritory value)
\r
2142 if ((value == null))
\r
2146 return (System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._employeeID, value._employeeID) && System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._territoryID, value._territoryID));
\r
2150 [Table(Name="Orders")]
\r
2151 public partial class Order : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Order>
\r
2154 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
2156 private string _customerID;
\r
2158 private System.Nullable<long> _employeeID;
\r
2160 private System.Nullable<decimal> _freight;
\r
2162 private System.Nullable<System.DateTime> _orderDate;
\r
2164 private long _orderID;
\r
2166 private System.Nullable<System.DateTime> _requiredDate;
\r
2168 private string _shipAddress;
\r
2170 private string _shipCity;
\r
2172 private string _shipCountry;
\r
2174 private string _shipName;
\r
2176 private System.Nullable<System.DateTime> _shippedDate;
\r
2178 private string _shipPostalCode;
\r
2180 private string _shipRegion;
\r
2182 private System.Nullable<long> _shipVia;
\r
2184 private EntitySet<OrderDetail> _orderDetails;
\r
2186 private EntityRef<Shipper> _shipper = new EntityRef<Shipper>();
\r
2188 private EntityRef<Employee> _employee = new EntityRef<Employee>();
\r
2190 private EntityRef<Customer> _customer = new EntityRef<Customer>();
\r
2192 #region Extensibility Method Declarations
\r
2193 partial void OnCreated();
\r
2195 partial void OnCustomerIDChanged();
\r
2197 partial void OnCustomerIDChanging(string value);
\r
2199 partial void OnEmployeeIDChanged();
\r
2201 partial void OnEmployeeIDChanging(System.Nullable<long> value);
\r
2203 partial void OnFreightChanged();
\r
2205 partial void OnFreightChanging(System.Nullable<decimal> value);
\r
2207 partial void OnOrderDateChanged();
\r
2209 partial void OnOrderDateChanging(System.Nullable<System.DateTime> value);
\r
2211 partial void OnOrderIDChanged();
\r
2213 partial void OnOrderIDChanging(long value);
\r
2215 partial void OnRequiredDateChanged();
\r
2217 partial void OnRequiredDateChanging(System.Nullable<System.DateTime> value);
\r
2219 partial void OnShipAddressChanged();
\r
2221 partial void OnShipAddressChanging(string value);
\r
2223 partial void OnShipCityChanged();
\r
2225 partial void OnShipCityChanging(string value);
\r
2227 partial void OnShipCountryChanged();
\r
2229 partial void OnShipCountryChanging(string value);
\r
2231 partial void OnShipNameChanged();
\r
2233 partial void OnShipNameChanging(string value);
\r
2235 partial void OnShippedDateChanged();
\r
2237 partial void OnShippedDateChanging(System.Nullable<System.DateTime> value);
\r
2239 partial void OnShipPostalCodeChanged();
\r
2241 partial void OnShipPostalCodeChanging(string value);
\r
2243 partial void OnShipRegionChanged();
\r
2245 partial void OnShipRegionChanging(string value);
\r
2247 partial void OnShipViaChanged();
\r
2249 partial void OnShipViaChanging(System.Nullable<long> value);
\r
2255 _orderDetails = new EntitySet<OrderDetail>(new Action<OrderDetail>(this.OrderDetails_Attach), new Action<OrderDetail>(this.OrderDetails_Detach));
\r
2259 [Column(Storage="_customerID", Name="CustomerID", DbType="nchar", AutoSync=AutoSync.Never)]
\r
2260 [DebuggerNonUserCode()]
\r
2261 public string CustomerID
\r
2265 return this._customerID;
\r
2269 if (((_customerID == value)
\r
2272 if (_customer.HasLoadedOrAssignedValue)
\r
2274 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2276 this.OnCustomerIDChanging(value);
\r
2277 this.SendPropertyChanging();
\r
2278 this._customerID = value;
\r
2279 this.SendPropertyChanged("CustomerID");
\r
2280 this.OnCustomerIDChanged();
\r
2285 [Column(Storage="_employeeID", Name="EmployeeID", DbType="integer", AutoSync=AutoSync.Never)]
\r
2286 [DebuggerNonUserCode()]
\r
2287 public System.Nullable<long> EmployeeID
\r
2291 return this._employeeID;
\r
2295 if ((_employeeID != value))
\r
2297 if (_employee.HasLoadedOrAssignedValue)
\r
2299 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2301 this.OnEmployeeIDChanging(value);
\r
2302 this.SendPropertyChanging();
\r
2303 this._employeeID = value;
\r
2304 this.SendPropertyChanged("EmployeeID");
\r
2305 this.OnEmployeeIDChanged();
\r
2310 [Column(Storage="_freight", Name="Freight", DbType="money", AutoSync=AutoSync.Never)]
\r
2311 [DebuggerNonUserCode()]
\r
2312 public System.Nullable<decimal> Freight
\r
2316 return this._freight;
\r
2320 if ((_freight != value))
\r
2322 this.OnFreightChanging(value);
\r
2323 this.SendPropertyChanging();
\r
2324 this._freight = value;
\r
2325 this.SendPropertyChanged("Freight");
\r
2326 this.OnFreightChanged();
\r
2331 [Column(Storage="_orderDate", Name="OrderDate", DbType="datetime", AutoSync=AutoSync.Never)]
\r
2332 [DebuggerNonUserCode()]
\r
2333 public System.Nullable<System.DateTime> OrderDate
\r
2337 return this._orderDate;
\r
2341 if ((_orderDate != value))
\r
2343 this.OnOrderDateChanging(value);
\r
2344 this.SendPropertyChanging();
\r
2345 this._orderDate = value;
\r
2346 this.SendPropertyChanged("OrderDate");
\r
2347 this.OnOrderDateChanged();
\r
2352 [Column(Storage="_orderID", Name="OrderID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2353 [DebuggerNonUserCode()]
\r
2354 public long OrderID
\r
2358 return this._orderID;
\r
2362 if ((_orderID != value))
\r
2364 this.OnOrderIDChanging(value);
\r
2365 this.SendPropertyChanging();
\r
2366 this._orderID = value;
\r
2367 this.SendPropertyChanged("OrderID");
\r
2368 this.OnOrderIDChanged();
\r
2373 [Column(Storage="_requiredDate", Name="RequiredDate", DbType="datetime", AutoSync=AutoSync.Never)]
\r
2374 [DebuggerNonUserCode()]
\r
2375 public System.Nullable<System.DateTime> RequiredDate
\r
2379 return this._requiredDate;
\r
2383 if ((_requiredDate != value))
\r
2385 this.OnRequiredDateChanging(value);
\r
2386 this.SendPropertyChanging();
\r
2387 this._requiredDate = value;
\r
2388 this.SendPropertyChanged("RequiredDate");
\r
2389 this.OnRequiredDateChanged();
\r
2394 [Column(Storage="_shipAddress", Name="ShipAddress", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2395 [DebuggerNonUserCode()]
\r
2396 public string ShipAddress
\r
2400 return this._shipAddress;
\r
2404 if (((_shipAddress == value)
\r
2407 this.OnShipAddressChanging(value);
\r
2408 this.SendPropertyChanging();
\r
2409 this._shipAddress = value;
\r
2410 this.SendPropertyChanged("ShipAddress");
\r
2411 this.OnShipAddressChanged();
\r
2416 [Column(Storage="_shipCity", Name="ShipCity", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2417 [DebuggerNonUserCode()]
\r
2418 public string ShipCity
\r
2422 return this._shipCity;
\r
2426 if (((_shipCity == value)
\r
2429 this.OnShipCityChanging(value);
\r
2430 this.SendPropertyChanging();
\r
2431 this._shipCity = value;
\r
2432 this.SendPropertyChanged("ShipCity");
\r
2433 this.OnShipCityChanged();
\r
2438 [Column(Storage="_shipCountry", Name="ShipCountry", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2439 [DebuggerNonUserCode()]
\r
2440 public string ShipCountry
\r
2444 return this._shipCountry;
\r
2448 if (((_shipCountry == value)
\r
2451 this.OnShipCountryChanging(value);
\r
2452 this.SendPropertyChanging();
\r
2453 this._shipCountry = value;
\r
2454 this.SendPropertyChanged("ShipCountry");
\r
2455 this.OnShipCountryChanged();
\r
2460 [Column(Storage="_shipName", Name="ShipName", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2461 [DebuggerNonUserCode()]
\r
2462 public string ShipName
\r
2466 return this._shipName;
\r
2470 if (((_shipName == value)
\r
2473 this.OnShipNameChanging(value);
\r
2474 this.SendPropertyChanging();
\r
2475 this._shipName = value;
\r
2476 this.SendPropertyChanged("ShipName");
\r
2477 this.OnShipNameChanged();
\r
2482 [Column(Storage="_shippedDate", Name="ShippedDate", DbType="datetime", AutoSync=AutoSync.Never)]
\r
2483 [DebuggerNonUserCode()]
\r
2484 public System.Nullable<System.DateTime> ShippedDate
\r
2488 return this._shippedDate;
\r
2492 if ((_shippedDate != value))
\r
2494 this.OnShippedDateChanging(value);
\r
2495 this.SendPropertyChanging();
\r
2496 this._shippedDate = value;
\r
2497 this.SendPropertyChanged("ShippedDate");
\r
2498 this.OnShippedDateChanged();
\r
2503 [Column(Storage="_shipPostalCode", Name="ShipPostalCode", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2504 [DebuggerNonUserCode()]
\r
2505 public string ShipPostalCode
\r
2509 return this._shipPostalCode;
\r
2513 if (((_shipPostalCode == value)
\r
2516 this.OnShipPostalCodeChanging(value);
\r
2517 this.SendPropertyChanging();
\r
2518 this._shipPostalCode = value;
\r
2519 this.SendPropertyChanged("ShipPostalCode");
\r
2520 this.OnShipPostalCodeChanged();
\r
2525 [Column(Storage="_shipRegion", Name="ShipRegion", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
2526 [DebuggerNonUserCode()]
\r
2527 public string ShipRegion
\r
2531 return this._shipRegion;
\r
2535 if (((_shipRegion == value)
\r
2538 this.OnShipRegionChanging(value);
\r
2539 this.SendPropertyChanging();
\r
2540 this._shipRegion = value;
\r
2541 this.SendPropertyChanged("ShipRegion");
\r
2542 this.OnShipRegionChanged();
\r
2547 [Column(Storage="_shipVia", Name="ShipVia", DbType="integer", AutoSync=AutoSync.Never)]
\r
2548 [DebuggerNonUserCode()]
\r
2549 public System.Nullable<long> ShipVia
\r
2553 return this._shipVia;
\r
2557 if ((_shipVia != value))
\r
2559 if (_shipper.HasLoadedOrAssignedValue)
\r
2561 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2563 this.OnShipViaChanging(value);
\r
2564 this.SendPropertyChanging();
\r
2565 this._shipVia = value;
\r
2566 this.SendPropertyChanged("ShipVia");
\r
2567 this.OnShipViaChanged();
\r
2573 [Association(Storage="_orderDetails", OtherKey="OrderID", ThisKey="OrderID", Name="FK_Order Details_1")]
\r
2574 [DebuggerNonUserCode()]
\r
2575 public EntitySet<OrderDetail> OrderDetails
\r
2579 return this._orderDetails;
\r
2583 this._orderDetails = value;
\r
2589 [Association(Storage="_shipper", OtherKey="ShipperID", ThisKey="ShipVia", Name="FK_Orders_0", IsForeignKey=true)]
\r
2590 [DebuggerNonUserCode()]
\r
2591 public Shipper Shipper
\r
2595 return this._shipper.Entity;
\r
2599 if (((this._shipper.Entity == value)
\r
2602 if ((this._shipper.Entity != null))
\r
2604 Shipper previousShipper = this._shipper.Entity;
\r
2605 this._shipper.Entity = null;
\r
2606 previousShipper.Orders.Remove(this);
\r
2608 this._shipper.Entity = value;
\r
2609 if ((value != null))
\r
2611 value.Orders.Add(this);
\r
2612 _shipVia = value.ShipperID;
\r
2622 [Association(Storage="_employee", OtherKey="EmployeeID", ThisKey="EmployeeID", Name="FK_Orders_1", IsForeignKey=true)]
\r
2623 [DebuggerNonUserCode()]
\r
2624 public Employee Employee
\r
2628 return this._employee.Entity;
\r
2632 if (((this._employee.Entity == value)
\r
2635 if ((this._employee.Entity != null))
\r
2637 Employee previousEmployee = this._employee.Entity;
\r
2638 this._employee.Entity = null;
\r
2639 previousEmployee.Orders.Remove(this);
\r
2641 this._employee.Entity = value;
\r
2642 if ((value != null))
\r
2644 value.Orders.Add(this);
\r
2645 _employeeID = value.EmployeeID;
\r
2649 _employeeID = null;
\r
2655 [Association(Storage="_customer", OtherKey="CustomerID", ThisKey="CustomerID", Name="FK_Orders_2", IsForeignKey=true)]
\r
2656 [DebuggerNonUserCode()]
\r
2657 public Customer Customer
\r
2661 return this._customer.Entity;
\r
2665 if (((this._customer.Entity == value)
\r
2668 if ((this._customer.Entity != null))
\r
2670 Customer previousCustomer = this._customer.Entity;
\r
2671 this._customer.Entity = null;
\r
2672 previousCustomer.Orders.Remove(this);
\r
2674 this._customer.Entity = value;
\r
2675 if ((value != null))
\r
2677 value.Orders.Add(this);
\r
2678 _customerID = value.CustomerID;
\r
2682 _customerID = null;
\r
2689 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
2691 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
2693 protected virtual void SendPropertyChanging()
\r
2695 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
2698 h(this, emptyChangingEventArgs);
\r
2702 protected virtual void SendPropertyChanged(string propertyName)
\r
2704 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
2707 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
2711 public override int GetHashCode()
\r
2715 | (_orderID.GetHashCode() * 1));
\r
2719 public override bool Equals(object value)
\r
2721 if ((value == null))
\r
2725 if (((value.GetType() == this.GetType())
\r
2730 Order other = ((Order)(value));
\r
2731 return this.Equals(other);
\r
2734 public virtual bool Equals(Order value)
\r
2736 if ((value == null))
\r
2740 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._orderID, value._orderID);
\r
2743 #region Attachment handlers
\r
2744 private void OrderDetails_Attach(OrderDetail entity)
\r
2746 this.SendPropertyChanging();
\r
2747 entity.Order = this;
\r
2750 private void OrderDetails_Detach(OrderDetail entity)
\r
2752 this.SendPropertyChanging();
\r
2753 entity.Order = null;
\r
2758 [Table(Name="Order Details")]
\r
2759 public partial class OrderDetail : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<OrderDetail>
\r
2762 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
2764 private float _discount;
\r
2766 private long _orderID;
\r
2768 private long _productID;
\r
2770 private short _quantity;
\r
2772 private decimal _unitPrice;
\r
2774 private EntityRef<Product> _product = new EntityRef<Product>();
\r
2776 private EntityRef<Order> _order = new EntityRef<Order>();
\r
2778 #region Extensibility Method Declarations
\r
2779 partial void OnCreated();
\r
2781 partial void OnDiscountChanged();
\r
2783 partial void OnDiscountChanging(float value);
\r
2785 partial void OnOrderIDChanged();
\r
2787 partial void OnOrderIDChanging(long value);
\r
2789 partial void OnProductIDChanged();
\r
2791 partial void OnProductIDChanging(long value);
\r
2793 partial void OnQuantityChanged();
\r
2795 partial void OnQuantityChanging(short value);
\r
2797 partial void OnUnitPriceChanged();
\r
2799 partial void OnUnitPriceChanging(decimal value);
\r
2803 public OrderDetail()
\r
2808 [Column(Storage="_discount", Name="Discount", DbType="real", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2809 [DebuggerNonUserCode()]
\r
2810 public float Discount
\r
2814 return this._discount;
\r
2818 if ((_discount != value))
\r
2820 this.OnDiscountChanging(value);
\r
2821 this.SendPropertyChanging();
\r
2822 this._discount = value;
\r
2823 this.SendPropertyChanged("Discount");
\r
2824 this.OnDiscountChanged();
\r
2829 [Column(Storage="_orderID", Name="OrderID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2830 [DebuggerNonUserCode()]
\r
2831 public long OrderID
\r
2835 return this._orderID;
\r
2839 if ((_orderID != value))
\r
2841 if (_order.HasLoadedOrAssignedValue)
\r
2843 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2845 this.OnOrderIDChanging(value);
\r
2846 this.SendPropertyChanging();
\r
2847 this._orderID = value;
\r
2848 this.SendPropertyChanged("OrderID");
\r
2849 this.OnOrderIDChanged();
\r
2854 [Column(Storage="_productID", Name="ProductID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2855 [DebuggerNonUserCode()]
\r
2856 public long ProductID
\r
2860 return this._productID;
\r
2864 if ((_productID != value))
\r
2866 if (_product.HasLoadedOrAssignedValue)
\r
2868 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
2870 this.OnProductIDChanging(value);
\r
2871 this.SendPropertyChanging();
\r
2872 this._productID = value;
\r
2873 this.SendPropertyChanged("ProductID");
\r
2874 this.OnProductIDChanged();
\r
2879 [Column(Storage="_quantity", Name="Quantity", DbType="smallint", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2880 [DebuggerNonUserCode()]
\r
2881 public short Quantity
\r
2885 return this._quantity;
\r
2889 if ((_quantity != value))
\r
2891 this.OnQuantityChanging(value);
\r
2892 this.SendPropertyChanging();
\r
2893 this._quantity = value;
\r
2894 this.SendPropertyChanged("Quantity");
\r
2895 this.OnQuantityChanged();
\r
2900 [Column(Storage="_unitPrice", Name="UnitPrice", DbType="money", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
2901 [DebuggerNonUserCode()]
\r
2902 public decimal UnitPrice
\r
2906 return this._unitPrice;
\r
2910 if ((_unitPrice != value))
\r
2912 this.OnUnitPriceChanging(value);
\r
2913 this.SendPropertyChanging();
\r
2914 this._unitPrice = value;
\r
2915 this.SendPropertyChanged("UnitPrice");
\r
2916 this.OnUnitPriceChanged();
\r
2922 [Association(Storage="_product", OtherKey="ProductID", ThisKey="ProductID", Name="FK_Order Details_0", IsForeignKey=true)]
\r
2923 [DebuggerNonUserCode()]
\r
2924 public Product Product
\r
2928 return this._product.Entity;
\r
2932 if (((this._product.Entity == value)
\r
2935 if ((this._product.Entity != null))
\r
2937 Product previousProduct = this._product.Entity;
\r
2938 this._product.Entity = null;
\r
2939 previousProduct.OrderDetails.Remove(this);
\r
2941 this._product.Entity = value;
\r
2942 if ((value != null))
\r
2944 value.OrderDetails.Add(this);
\r
2945 _productID = value.ProductID;
\r
2949 _productID = default(long);
\r
2955 [Association(Storage="_order", OtherKey="OrderID", ThisKey="OrderID", Name="FK_Order Details_1", IsForeignKey=true)]
\r
2956 [DebuggerNonUserCode()]
\r
2957 public Order Order
\r
2961 return this._order.Entity;
\r
2965 if (((this._order.Entity == value)
\r
2968 if ((this._order.Entity != null))
\r
2970 Order previousOrder = this._order.Entity;
\r
2971 this._order.Entity = null;
\r
2972 previousOrder.OrderDetails.Remove(this);
\r
2974 this._order.Entity = value;
\r
2975 if ((value != null))
\r
2977 value.OrderDetails.Add(this);
\r
2978 _orderID = value.OrderID;
\r
2982 _orderID = default(long);
\r
2989 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
2991 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
2993 protected virtual void SendPropertyChanging()
\r
2995 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
2998 h(this, emptyChangingEventArgs);
\r
3002 protected virtual void SendPropertyChanged(string propertyName)
\r
3004 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
3007 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
3011 public override int GetHashCode()
\r
3015 | (_orderID.GetHashCode() * 1));
\r
3017 | (_productID.GetHashCode() * 65536));
\r
3021 public override bool Equals(object value)
\r
3023 if ((value == null))
\r
3027 if (((value.GetType() == this.GetType())
\r
3032 OrderDetail other = ((OrderDetail)(value));
\r
3033 return this.Equals(other);
\r
3036 public virtual bool Equals(OrderDetail value)
\r
3038 if ((value == null))
\r
3042 return (System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._orderID, value._orderID) && System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._productID, value._productID));
\r
3046 [Table(Name="Products")]
\r
3047 public partial class Product : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Product>
\r
3050 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
3052 private System.Nullable<long> _categoryID;
\r
3054 private bool _discontinued;
\r
3056 private long _productID;
\r
3058 private string _productName;
\r
3060 private string _quantityPerUnit;
\r
3062 private System.Nullable<short> _reorderLevel;
\r
3064 private System.Nullable<long> _supplierID;
\r
3066 private System.Nullable<decimal> _unitPrice;
\r
3068 private System.Nullable<short> _unitsInStock;
\r
3070 private System.Nullable<short> _unitsOnOrder;
\r
3072 private EntitySet<OrderDetail> _orderDetails;
\r
3074 private EntityRef<Supplier> _supplier = new EntityRef<Supplier>();
\r
3076 private EntityRef<Category> _category = new EntityRef<Category>();
\r
3078 #region Extensibility Method Declarations
\r
3079 partial void OnCreated();
\r
3081 partial void OnCategoryIDChanged();
\r
3083 partial void OnCategoryIDChanging(System.Nullable<long> value);
\r
3085 partial void OnDiscontinuedChanged();
\r
3087 partial void OnDiscontinuedChanging(bool value);
\r
3089 partial void OnProductIDChanged();
\r
3091 partial void OnProductIDChanging(long value);
\r
3093 partial void OnProductNameChanged();
\r
3095 partial void OnProductNameChanging(string value);
\r
3097 partial void OnQuantityPerUnitChanged();
\r
3099 partial void OnQuantityPerUnitChanging(string value);
\r
3101 partial void OnReorderLevelChanged();
\r
3103 partial void OnReorderLevelChanging(System.Nullable<short> value);
\r
3105 partial void OnSupplierIDChanged();
\r
3107 partial void OnSupplierIDChanging(System.Nullable<long> value);
\r
3109 partial void OnUnitPriceChanged();
\r
3111 partial void OnUnitPriceChanging(System.Nullable<decimal> value);
\r
3113 partial void OnUnitsInStockChanged();
\r
3115 partial void OnUnitsInStockChanging(System.Nullable<short> value);
\r
3117 partial void OnUnitsOnOrderChanged();
\r
3119 partial void OnUnitsOnOrderChanging(System.Nullable<short> value);
\r
3125 _orderDetails = new EntitySet<OrderDetail>(new Action<OrderDetail>(this.OrderDetails_Attach), new Action<OrderDetail>(this.OrderDetails_Detach));
\r
3129 [Column(Storage="_categoryID", Name="CategoryID", DbType="integer", AutoSync=AutoSync.Never)]
\r
3130 [DebuggerNonUserCode()]
\r
3131 public System.Nullable<long> CategoryID
\r
3135 return this._categoryID;
\r
3139 if ((_categoryID != value))
\r
3141 if (_category.HasLoadedOrAssignedValue)
\r
3143 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
3145 this.OnCategoryIDChanging(value);
\r
3146 this.SendPropertyChanging();
\r
3147 this._categoryID = value;
\r
3148 this.SendPropertyChanged("CategoryID");
\r
3149 this.OnCategoryIDChanged();
\r
3154 [Column(Storage="_discontinued", Name="Discontinued", DbType="bit", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3155 [DebuggerNonUserCode()]
\r
3156 public bool Discontinued
\r
3160 return this._discontinued;
\r
3164 if ((_discontinued != value))
\r
3166 this.OnDiscontinuedChanging(value);
\r
3167 this.SendPropertyChanging();
\r
3168 this._discontinued = value;
\r
3169 this.SendPropertyChanged("Discontinued");
\r
3170 this.OnDiscontinuedChanged();
\r
3175 [Column(Storage="_productID", Name="ProductID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3176 [DebuggerNonUserCode()]
\r
3177 public long ProductID
\r
3181 return this._productID;
\r
3185 if ((_productID != value))
\r
3187 this.OnProductIDChanging(value);
\r
3188 this.SendPropertyChanging();
\r
3189 this._productID = value;
\r
3190 this.SendPropertyChanged("ProductID");
\r
3191 this.OnProductIDChanged();
\r
3196 [Column(Storage="_productName", Name="ProductName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3197 [DebuggerNonUserCode()]
\r
3198 public string ProductName
\r
3202 return this._productName;
\r
3206 if (((_productName == value)
\r
3209 this.OnProductNameChanging(value);
\r
3210 this.SendPropertyChanging();
\r
3211 this._productName = value;
\r
3212 this.SendPropertyChanged("ProductName");
\r
3213 this.OnProductNameChanged();
\r
3218 [Column(Storage="_quantityPerUnit", Name="QuantityPerUnit", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
3219 [DebuggerNonUserCode()]
\r
3220 public string QuantityPerUnit
\r
3224 return this._quantityPerUnit;
\r
3228 if (((_quantityPerUnit == value)
\r
3231 this.OnQuantityPerUnitChanging(value);
\r
3232 this.SendPropertyChanging();
\r
3233 this._quantityPerUnit = value;
\r
3234 this.SendPropertyChanged("QuantityPerUnit");
\r
3235 this.OnQuantityPerUnitChanged();
\r
3240 [Column(Storage="_reorderLevel", Name="ReorderLevel", DbType="smallint", AutoSync=AutoSync.Never)]
\r
3241 [DebuggerNonUserCode()]
\r
3242 public System.Nullable<short> ReorderLevel
\r
3246 return this._reorderLevel;
\r
3250 if ((_reorderLevel != value))
\r
3252 this.OnReorderLevelChanging(value);
\r
3253 this.SendPropertyChanging();
\r
3254 this._reorderLevel = value;
\r
3255 this.SendPropertyChanged("ReorderLevel");
\r
3256 this.OnReorderLevelChanged();
\r
3261 [Column(Storage="_supplierID", Name="SupplierID", DbType="integer", AutoSync=AutoSync.Never)]
\r
3262 [DebuggerNonUserCode()]
\r
3263 public System.Nullable<long> SupplierID
\r
3267 return this._supplierID;
\r
3271 if ((_supplierID != value))
\r
3273 if (_supplier.HasLoadedOrAssignedValue)
\r
3275 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
3277 this.OnSupplierIDChanging(value);
\r
3278 this.SendPropertyChanging();
\r
3279 this._supplierID = value;
\r
3280 this.SendPropertyChanged("SupplierID");
\r
3281 this.OnSupplierIDChanged();
\r
3286 [Column(Storage="_unitPrice", Name="UnitPrice", DbType="money", AutoSync=AutoSync.Never)]
\r
3287 [DebuggerNonUserCode()]
\r
3288 public System.Nullable<decimal> UnitPrice
\r
3292 return this._unitPrice;
\r
3296 if ((_unitPrice != value))
\r
3298 this.OnUnitPriceChanging(value);
\r
3299 this.SendPropertyChanging();
\r
3300 this._unitPrice = value;
\r
3301 this.SendPropertyChanged("UnitPrice");
\r
3302 this.OnUnitPriceChanged();
\r
3307 [Column(Storage="_unitsInStock", Name="UnitsInStock", DbType="smallint", AutoSync=AutoSync.Never)]
\r
3308 [DebuggerNonUserCode()]
\r
3309 public System.Nullable<short> UnitsInStock
\r
3313 return this._unitsInStock;
\r
3317 if ((_unitsInStock != value))
\r
3319 this.OnUnitsInStockChanging(value);
\r
3320 this.SendPropertyChanging();
\r
3321 this._unitsInStock = value;
\r
3322 this.SendPropertyChanged("UnitsInStock");
\r
3323 this.OnUnitsInStockChanged();
\r
3328 [Column(Storage="_unitsOnOrder", Name="UnitsOnOrder", DbType="smallint", AutoSync=AutoSync.Never)]
\r
3329 [DebuggerNonUserCode()]
\r
3330 public System.Nullable<short> UnitsOnOrder
\r
3334 return this._unitsOnOrder;
\r
3338 if ((_unitsOnOrder != value))
\r
3340 this.OnUnitsOnOrderChanging(value);
\r
3341 this.SendPropertyChanging();
\r
3342 this._unitsOnOrder = value;
\r
3343 this.SendPropertyChanged("UnitsOnOrder");
\r
3344 this.OnUnitsOnOrderChanged();
\r
3350 [Association(Storage="_orderDetails", OtherKey="ProductID", ThisKey="ProductID", Name="FK_Order Details_0")]
\r
3351 [DebuggerNonUserCode()]
\r
3352 public EntitySet<OrderDetail> OrderDetails
\r
3356 return this._orderDetails;
\r
3360 this._orderDetails = value;
\r
3366 [Association(Storage="_supplier", OtherKey="SupplierID", ThisKey="SupplierID", Name="FK_Products_0", IsForeignKey=true)]
\r
3367 [DebuggerNonUserCode()]
\r
3368 public Supplier Supplier
\r
3372 return this._supplier.Entity;
\r
3376 if (((this._supplier.Entity == value)
\r
3379 if ((this._supplier.Entity != null))
\r
3381 Supplier previousSupplier = this._supplier.Entity;
\r
3382 this._supplier.Entity = null;
\r
3383 previousSupplier.Products.Remove(this);
\r
3385 this._supplier.Entity = value;
\r
3386 if ((value != null))
\r
3388 value.Products.Add(this);
\r
3389 _supplierID = value.SupplierID;
\r
3393 _supplierID = null;
\r
3399 [Association(Storage="_category", OtherKey="CategoryID", ThisKey="CategoryID", Name="FK_Products_1", IsForeignKey=true)]
\r
3400 [DebuggerNonUserCode()]
\r
3401 public Category Category
\r
3405 return this._category.Entity;
\r
3409 if (((this._category.Entity == value)
\r
3412 if ((this._category.Entity != null))
\r
3414 Category previousCategory = this._category.Entity;
\r
3415 this._category.Entity = null;
\r
3416 previousCategory.Products.Remove(this);
\r
3418 this._category.Entity = value;
\r
3419 if ((value != null))
\r
3421 value.Products.Add(this);
\r
3422 _categoryID = value.CategoryID;
\r
3426 _categoryID = null;
\r
3433 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
3435 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
3437 protected virtual void SendPropertyChanging()
\r
3439 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
3442 h(this, emptyChangingEventArgs);
\r
3446 protected virtual void SendPropertyChanged(string propertyName)
\r
3448 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
3451 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
3455 public override int GetHashCode()
\r
3459 | (_productID.GetHashCode() * 1));
\r
3463 public override bool Equals(object value)
\r
3465 if ((value == null))
\r
3469 if (((value.GetType() == this.GetType())
\r
3474 Product other = ((Product)(value));
\r
3475 return this.Equals(other);
\r
3478 public virtual bool Equals(Product value)
\r
3480 if ((value == null))
\r
3484 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._productID, value._productID);
\r
3487 #region Attachment handlers
\r
3488 private void OrderDetails_Attach(OrderDetail entity)
\r
3490 this.SendPropertyChanging();
\r
3491 entity.Product = this;
\r
3494 private void OrderDetails_Detach(OrderDetail entity)
\r
3496 this.SendPropertyChanging();
\r
3497 entity.Product = null;
\r
3502 [Table(Name="Region")]
\r
3503 public partial class Region : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Region>
\r
3506 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
3508 private string _regionDescription;
\r
3510 private long _regionID;
\r
3512 private EntitySet<Territory> _territories;
\r
3514 #region Extensibility Method Declarations
\r
3515 partial void OnCreated();
\r
3517 partial void OnRegionDescriptionChanged();
\r
3519 partial void OnRegionDescriptionChanging(string value);
\r
3521 partial void OnRegionIDChanged();
\r
3523 partial void OnRegionIDChanging(long value);
\r
3529 _territories = new EntitySet<Territory>(new Action<Territory>(this.Territories_Attach), new Action<Territory>(this.Territories_Detach));
\r
3533 [Column(Storage="_regionDescription", Name="RegionDescription", DbType="nchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3534 [DebuggerNonUserCode()]
\r
3535 public string RegionDescription
\r
3539 return this._regionDescription;
\r
3543 if (((_regionDescription == value)
\r
3546 this.OnRegionDescriptionChanging(value);
\r
3547 this.SendPropertyChanging();
\r
3548 this._regionDescription = value;
\r
3549 this.SendPropertyChanged("RegionDescription");
\r
3550 this.OnRegionDescriptionChanged();
\r
3555 [Column(Storage="_regionID", Name="RegionID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3556 [DebuggerNonUserCode()]
\r
3557 public long RegionID
\r
3561 return this._regionID;
\r
3565 if ((_regionID != value))
\r
3567 this.OnRegionIDChanging(value);
\r
3568 this.SendPropertyChanging();
\r
3569 this._regionID = value;
\r
3570 this.SendPropertyChanged("RegionID");
\r
3571 this.OnRegionIDChanged();
\r
3577 [Association(Storage="_territories", OtherKey="RegionID", ThisKey="RegionID", Name="FK_Territories_0")]
\r
3578 [DebuggerNonUserCode()]
\r
3579 public EntitySet<Territory> Territories
\r
3583 return this._territories;
\r
3587 this._territories = value;
\r
3592 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
3594 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
3596 protected virtual void SendPropertyChanging()
\r
3598 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
3601 h(this, emptyChangingEventArgs);
\r
3605 protected virtual void SendPropertyChanged(string propertyName)
\r
3607 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
3610 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
3614 public override int GetHashCode()
\r
3618 | (_regionID.GetHashCode() * 1));
\r
3622 public override bool Equals(object value)
\r
3624 if ((value == null))
\r
3628 if (((value.GetType() == this.GetType())
\r
3633 Region other = ((Region)(value));
\r
3634 return this.Equals(other);
\r
3637 public virtual bool Equals(Region value)
\r
3639 if ((value == null))
\r
3643 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._regionID, value._regionID);
\r
3646 #region Attachment handlers
\r
3647 private void Territories_Attach(Territory entity)
\r
3649 this.SendPropertyChanging();
\r
3650 entity.Region = this;
\r
3653 private void Territories_Detach(Territory entity)
\r
3655 this.SendPropertyChanging();
\r
3656 entity.Region = null;
\r
3661 [Table(Name="Shippers")]
\r
3662 public partial class Shipper : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Shipper>
\r
3665 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
3667 private string _companyName;
\r
3669 private string _phone;
\r
3671 private long _shipperID;
\r
3673 private EntitySet<Order> _orders;
\r
3675 #region Extensibility Method Declarations
\r
3676 partial void OnCreated();
\r
3678 partial void OnCompanyNameChanged();
\r
3680 partial void OnCompanyNameChanging(string value);
\r
3682 partial void OnPhoneChanged();
\r
3684 partial void OnPhoneChanging(string value);
\r
3686 partial void OnShipperIDChanged();
\r
3688 partial void OnShipperIDChanging(long value);
\r
3694 _orders = new EntitySet<Order>(new Action<Order>(this.Orders_Attach), new Action<Order>(this.Orders_Detach));
\r
3698 [Column(Storage="_companyName", Name="CompanyName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3699 [DebuggerNonUserCode()]
\r
3700 public string CompanyName
\r
3704 return this._companyName;
\r
3708 if (((_companyName == value)
\r
3711 this.OnCompanyNameChanging(value);
\r
3712 this.SendPropertyChanging();
\r
3713 this._companyName = value;
\r
3714 this.SendPropertyChanged("CompanyName");
\r
3715 this.OnCompanyNameChanged();
\r
3720 [Column(Storage="_phone", Name="Phone", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
3721 [DebuggerNonUserCode()]
\r
3722 public string Phone
\r
3726 return this._phone;
\r
3730 if (((_phone == value)
\r
3733 this.OnPhoneChanging(value);
\r
3734 this.SendPropertyChanging();
\r
3735 this._phone = value;
\r
3736 this.SendPropertyChanged("Phone");
\r
3737 this.OnPhoneChanged();
\r
3742 [Column(Storage="_shipperID", Name="ShipperID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3743 [DebuggerNonUserCode()]
\r
3744 public long ShipperID
\r
3748 return this._shipperID;
\r
3752 if ((_shipperID != value))
\r
3754 this.OnShipperIDChanging(value);
\r
3755 this.SendPropertyChanging();
\r
3756 this._shipperID = value;
\r
3757 this.SendPropertyChanged("ShipperID");
\r
3758 this.OnShipperIDChanged();
\r
3764 [Association(Storage="_orders", OtherKey="ShipVia", ThisKey="ShipperID", Name="FK_Orders_0")]
\r
3765 [DebuggerNonUserCode()]
\r
3766 public EntitySet<Order> Orders
\r
3770 return this._orders;
\r
3774 this._orders = value;
\r
3779 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
3781 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
3783 protected virtual void SendPropertyChanging()
\r
3785 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
3788 h(this, emptyChangingEventArgs);
\r
3792 protected virtual void SendPropertyChanged(string propertyName)
\r
3794 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
3797 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
3801 public override int GetHashCode()
\r
3805 | (_shipperID.GetHashCode() * 1));
\r
3809 public override bool Equals(object value)
\r
3811 if ((value == null))
\r
3815 if (((value.GetType() == this.GetType())
\r
3820 Shipper other = ((Shipper)(value));
\r
3821 return this.Equals(other);
\r
3824 public virtual bool Equals(Shipper value)
\r
3826 if ((value == null))
\r
3830 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._shipperID, value._shipperID);
\r
3833 #region Attachment handlers
\r
3834 private void Orders_Attach(Order entity)
\r
3836 this.SendPropertyChanging();
\r
3837 entity.Shipper = this;
\r
3840 private void Orders_Detach(Order entity)
\r
3842 this.SendPropertyChanging();
\r
3843 entity.Shipper = null;
\r
3848 [Table(Name="Suppliers")]
\r
3849 public partial class Supplier : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Supplier>
\r
3852 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
3854 private string _address;
\r
3856 private string _city;
\r
3858 private string _companyName;
\r
3860 private string _contactName;
\r
3862 private string _contactTitle;
\r
3864 private string _country;
\r
3866 private string _fax;
\r
3868 private string _homePage;
\r
3870 private string _phone;
\r
3872 private string _postalCode;
\r
3874 private string _region;
\r
3876 private long _supplierID;
\r
3878 private EntitySet<Product> _products;
\r
3880 #region Extensibility Method Declarations
\r
3881 partial void OnCreated();
\r
3883 partial void OnAddressChanged();
\r
3885 partial void OnAddressChanging(string value);
\r
3887 partial void OnCityChanged();
\r
3889 partial void OnCityChanging(string value);
\r
3891 partial void OnCompanyNameChanged();
\r
3893 partial void OnCompanyNameChanging(string value);
\r
3895 partial void OnContactNameChanged();
\r
3897 partial void OnContactNameChanging(string value);
\r
3899 partial void OnContactTitleChanged();
\r
3901 partial void OnContactTitleChanging(string value);
\r
3903 partial void OnCountryChanged();
\r
3905 partial void OnCountryChanging(string value);
\r
3907 partial void OnFaxChanged();
\r
3909 partial void OnFaxChanging(string value);
\r
3911 partial void OnHomePageChanged();
\r
3913 partial void OnHomePageChanging(string value);
\r
3915 partial void OnPhoneChanged();
\r
3917 partial void OnPhoneChanging(string value);
\r
3919 partial void OnPostalCodeChanged();
\r
3921 partial void OnPostalCodeChanging(string value);
\r
3923 partial void OnRegionChanged();
\r
3925 partial void OnRegionChanging(string value);
\r
3927 partial void OnSupplierIDChanged();
\r
3929 partial void OnSupplierIDChanging(long value);
\r
3935 _products = new EntitySet<Product>(new Action<Product>(this.Products_Attach), new Action<Product>(this.Products_Detach));
\r
3939 [Column(Storage="_address", Name="Address", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
3940 [DebuggerNonUserCode()]
\r
3941 public string Address
\r
3945 return this._address;
\r
3949 if (((_address == value)
\r
3952 this.OnAddressChanging(value);
\r
3953 this.SendPropertyChanging();
\r
3954 this._address = value;
\r
3955 this.SendPropertyChanged("Address");
\r
3956 this.OnAddressChanged();
\r
3961 [Column(Storage="_city", Name="City", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
3962 [DebuggerNonUserCode()]
\r
3963 public string City
\r
3967 return this._city;
\r
3971 if (((_city == value)
\r
3974 this.OnCityChanging(value);
\r
3975 this.SendPropertyChanging();
\r
3976 this._city = value;
\r
3977 this.SendPropertyChanged("City");
\r
3978 this.OnCityChanged();
\r
3983 [Column(Storage="_companyName", Name="CompanyName", DbType="nvarchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
3984 [DebuggerNonUserCode()]
\r
3985 public string CompanyName
\r
3989 return this._companyName;
\r
3993 if (((_companyName == value)
\r
3996 this.OnCompanyNameChanging(value);
\r
3997 this.SendPropertyChanging();
\r
3998 this._companyName = value;
\r
3999 this.SendPropertyChanged("CompanyName");
\r
4000 this.OnCompanyNameChanged();
\r
4005 [Column(Storage="_contactName", Name="ContactName", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4006 [DebuggerNonUserCode()]
\r
4007 public string ContactName
\r
4011 return this._contactName;
\r
4015 if (((_contactName == value)
\r
4018 this.OnContactNameChanging(value);
\r
4019 this.SendPropertyChanging();
\r
4020 this._contactName = value;
\r
4021 this.SendPropertyChanged("ContactName");
\r
4022 this.OnContactNameChanged();
\r
4027 [Column(Storage="_contactTitle", Name="ContactTitle", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4028 [DebuggerNonUserCode()]
\r
4029 public string ContactTitle
\r
4033 return this._contactTitle;
\r
4037 if (((_contactTitle == value)
\r
4040 this.OnContactTitleChanging(value);
\r
4041 this.SendPropertyChanging();
\r
4042 this._contactTitle = value;
\r
4043 this.SendPropertyChanged("ContactTitle");
\r
4044 this.OnContactTitleChanged();
\r
4049 [Column(Storage="_country", Name="Country", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4050 [DebuggerNonUserCode()]
\r
4051 public string Country
\r
4055 return this._country;
\r
4059 if (((_country == value)
\r
4062 this.OnCountryChanging(value);
\r
4063 this.SendPropertyChanging();
\r
4064 this._country = value;
\r
4065 this.SendPropertyChanged("Country");
\r
4066 this.OnCountryChanged();
\r
4071 [Column(Storage="_fax", Name="Fax", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4072 [DebuggerNonUserCode()]
\r
4081 if (((_fax == value)
\r
4084 this.OnFaxChanging(value);
\r
4085 this.SendPropertyChanging();
\r
4086 this._fax = value;
\r
4087 this.SendPropertyChanged("Fax");
\r
4088 this.OnFaxChanged();
\r
4093 [Column(Storage="_homePage", Name="HomePage", DbType="ntext", AutoSync=AutoSync.Never)]
\r
4094 [DebuggerNonUserCode()]
\r
4095 public string HomePage
\r
4099 return this._homePage;
\r
4103 if (((_homePage == value)
\r
4106 this.OnHomePageChanging(value);
\r
4107 this.SendPropertyChanging();
\r
4108 this._homePage = value;
\r
4109 this.SendPropertyChanged("HomePage");
\r
4110 this.OnHomePageChanged();
\r
4115 [Column(Storage="_phone", Name="Phone", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4116 [DebuggerNonUserCode()]
\r
4117 public string Phone
\r
4121 return this._phone;
\r
4125 if (((_phone == value)
\r
4128 this.OnPhoneChanging(value);
\r
4129 this.SendPropertyChanging();
\r
4130 this._phone = value;
\r
4131 this.SendPropertyChanged("Phone");
\r
4132 this.OnPhoneChanged();
\r
4137 [Column(Storage="_postalCode", Name="PostalCode", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4138 [DebuggerNonUserCode()]
\r
4139 public string PostalCode
\r
4143 return this._postalCode;
\r
4147 if (((_postalCode == value)
\r
4150 this.OnPostalCodeChanging(value);
\r
4151 this.SendPropertyChanging();
\r
4152 this._postalCode = value;
\r
4153 this.SendPropertyChanged("PostalCode");
\r
4154 this.OnPostalCodeChanged();
\r
4159 [Column(Storage="_region", Name="Region", DbType="nvarchar", AutoSync=AutoSync.Never)]
\r
4160 [DebuggerNonUserCode()]
\r
4161 public string Region
\r
4165 return this._region;
\r
4169 if (((_region == value)
\r
4172 this.OnRegionChanging(value);
\r
4173 this.SendPropertyChanging();
\r
4174 this._region = value;
\r
4175 this.SendPropertyChanged("Region");
\r
4176 this.OnRegionChanged();
\r
4181 [Column(Storage="_supplierID", Name="SupplierID", DbType="integer", IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
4182 [DebuggerNonUserCode()]
\r
4183 public long SupplierID
\r
4187 return this._supplierID;
\r
4191 if ((_supplierID != value))
\r
4193 this.OnSupplierIDChanging(value);
\r
4194 this.SendPropertyChanging();
\r
4195 this._supplierID = value;
\r
4196 this.SendPropertyChanged("SupplierID");
\r
4197 this.OnSupplierIDChanged();
\r
4203 [Association(Storage="_products", OtherKey="SupplierID", ThisKey="SupplierID", Name="FK_Products_0")]
\r
4204 [DebuggerNonUserCode()]
\r
4205 public EntitySet<Product> Products
\r
4209 return this._products;
\r
4213 this._products = value;
\r
4218 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
4220 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
4222 protected virtual void SendPropertyChanging()
\r
4224 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
4227 h(this, emptyChangingEventArgs);
\r
4231 protected virtual void SendPropertyChanged(string propertyName)
\r
4233 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
4236 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
4240 public override int GetHashCode()
\r
4244 | (_supplierID.GetHashCode() * 1));
\r
4248 public override bool Equals(object value)
\r
4250 if ((value == null))
\r
4254 if (((value.GetType() == this.GetType())
\r
4259 Supplier other = ((Supplier)(value));
\r
4260 return this.Equals(other);
\r
4263 public virtual bool Equals(Supplier value)
\r
4265 if ((value == null))
\r
4269 return System.Collections.Generic.EqualityComparer<long>.Default.Equals(this._supplierID, value._supplierID);
\r
4272 #region Attachment handlers
\r
4273 private void Products_Attach(Product entity)
\r
4275 this.SendPropertyChanging();
\r
4276 entity.Supplier = this;
\r
4279 private void Products_Detach(Product entity)
\r
4281 this.SendPropertyChanging();
\r
4282 entity.Supplier = null;
\r
4287 [Table(Name="Territories")]
\r
4288 public partial class Territory : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.IEquatable<Territory>
\r
4291 private static System.ComponentModel.PropertyChangingEventArgs emptyChangingEventArgs = new System.ComponentModel.PropertyChangingEventArgs("");
\r
4293 private long _regionID;
\r
4295 private string _territoryDescription;
\r
4297 private string _territoryID;
\r
4299 private EntitySet<EmployeeTerritory> _employeeTerritories;
\r
4301 private EntityRef<Region> _region = new EntityRef<Region>();
\r
4303 #region Extensibility Method Declarations
\r
4304 partial void OnCreated();
\r
4306 partial void OnRegionIDChanged();
\r
4308 partial void OnRegionIDChanging(long value);
\r
4310 partial void OnTerritoryDescriptionChanged();
\r
4312 partial void OnTerritoryDescriptionChanging(string value);
\r
4314 partial void OnTerritoryIDChanged();
\r
4316 partial void OnTerritoryIDChanging(string value);
\r
4320 public Territory()
\r
4322 _employeeTerritories = new EntitySet<EmployeeTerritory>(new Action<EmployeeTerritory>(this.EmployeeTerritories_Attach), new Action<EmployeeTerritory>(this.EmployeeTerritories_Detach));
\r
4326 [Column(Storage="_regionID", Name="RegionID", DbType="integer", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
4327 [DebuggerNonUserCode()]
\r
4328 public long RegionID
\r
4332 return this._regionID;
\r
4336 if ((_regionID != value))
\r
4338 if (_region.HasLoadedOrAssignedValue)
\r
4340 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
\r
4342 this.OnRegionIDChanging(value);
\r
4343 this.SendPropertyChanging();
\r
4344 this._regionID = value;
\r
4345 this.SendPropertyChanged("RegionID");
\r
4346 this.OnRegionIDChanged();
\r
4351 [Column(Storage="_territoryDescription", Name="TerritoryDescription", DbType="nchar", AutoSync=AutoSync.Never, CanBeNull=false)]
\r
4352 [DebuggerNonUserCode()]
\r
4353 public string TerritoryDescription
\r
4357 return this._territoryDescription;
\r
4361 if (((_territoryDescription == value)
\r
4364 this.OnTerritoryDescriptionChanging(value);
\r
4365 this.SendPropertyChanging();
\r
4366 this._territoryDescription = value;
\r
4367 this.SendPropertyChanged("TerritoryDescription");
\r
4368 this.OnTerritoryDescriptionChanged();
\r
4373 [Column(Storage="_territoryID", Name="TerritoryID", DbType="nvarchar", IsPrimaryKey=true, AutoSync=AutoSync.Never, CanBeNull=false)]
\r
4374 [DebuggerNonUserCode()]
\r
4375 public string TerritoryID
\r
4379 return this._territoryID;
\r
4383 if (((_territoryID == value)
\r
4386 this.OnTerritoryIDChanging(value);
\r
4387 this.SendPropertyChanging();
\r
4388 this._territoryID = value;
\r
4389 this.SendPropertyChanged("TerritoryID");
\r
4390 this.OnTerritoryIDChanged();
\r
4396 [Association(Storage="_employeeTerritories", OtherKey="TerritoryID", ThisKey="TerritoryID", Name="FK_EmployeeTerritories_0")]
\r
4397 [DebuggerNonUserCode()]
\r
4398 public EntitySet<EmployeeTerritory> EmployeeTerritories
\r
4402 return this._employeeTerritories;
\r
4406 this._employeeTerritories = value;
\r
4412 [Association(Storage="_region", OtherKey="RegionID", ThisKey="RegionID", Name="FK_Territories_0", IsForeignKey=true)]
\r
4413 [DebuggerNonUserCode()]
\r
4414 public Region Region
\r
4418 return this._region.Entity;
\r
4422 if (((this._region.Entity == value)
\r
4425 if ((this._region.Entity != null))
\r
4427 Region previousRegion = this._region.Entity;
\r
4428 this._region.Entity = null;
\r
4429 previousRegion.Territories.Remove(this);
\r
4431 this._region.Entity = value;
\r
4432 if ((value != null))
\r
4434 value.Territories.Add(this);
\r
4435 _regionID = value.RegionID;
\r
4439 _regionID = default(long);
\r
4446 public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
\r
4448 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
\r
4450 protected virtual void SendPropertyChanging()
\r
4452 System.ComponentModel.PropertyChangingEventHandler h = this.PropertyChanging;
\r
4455 h(this, emptyChangingEventArgs);
\r
4459 protected virtual void SendPropertyChanged(string propertyName)
\r
4461 System.ComponentModel.PropertyChangedEventHandler h = this.PropertyChanged;
\r
4464 h(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
\r
4468 public override int GetHashCode()
\r
4471 if ((_territoryID != null))
\r
4474 | (_territoryID.GetHashCode() * 1));
\r
4479 public override bool Equals(object value)
\r
4481 if ((value == null))
\r
4485 if (((value.GetType() == this.GetType())
\r
4490 Territory other = ((Territory)(value));
\r
4491 return this.Equals(other);
\r
4494 public virtual bool Equals(Territory value)
\r
4496 if ((value == null))
\r
4500 return System.Collections.Generic.EqualityComparer<string>.Default.Equals(this._territoryID, value._territoryID);
\r
4503 #region Attachment handlers
\r
4504 private void EmployeeTerritories_Attach(EmployeeTerritory entity)
\r
4506 this.SendPropertyChanging();
\r
4507 entity.Territory = this;
\r
4510 private void EmployeeTerritories_Detach(EmployeeTerritory entity)
\r
4512 this.SendPropertyChanging();
\r
4513 entity.Territory = null;
\r