'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.4927
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.Linq
Imports System.Linq.Expressions
Imports System.Reflection


<System.Data.Linq.Mapping.DatabaseAttribute(Name:="Northwind")>  _
Partial Public Class NorthwindDataContext
	Inherits System.Data.Linq.DataContext
	
	Private Shared mappingSource As System.Data.Linq.Mapping.MappingSource = New AttributeMappingSource
	
  #Region "Extensibility Method Definitions"
  Partial Private Sub OnCreated()
  End Sub
  Partial Private Sub InsertCategory(instance As Category)
    End Sub
  Partial Private Sub UpdateCategory(instance As Category)
    End Sub
  Partial Private Sub DeleteCategory(instance As Category)
    End Sub
  Partial Private Sub InsertCustomerCustomerDemo(instance As CustomerCustomerDemo)
    End Sub
  Partial Private Sub UpdateCustomerCustomerDemo(instance As CustomerCustomerDemo)
    End Sub
  Partial Private Sub DeleteCustomerCustomerDemo(instance As CustomerCustomerDemo)
    End Sub
  Partial Private Sub InsertTerritory(instance As Territory)
    End Sub
  Partial Private Sub UpdateTerritory(instance As Territory)
    End Sub
  Partial Private Sub DeleteTerritory(instance As Territory)
    End Sub
  Partial Private Sub InsertCustomerDemographic(instance As CustomerDemographic)
    End Sub
  Partial Private Sub UpdateCustomerDemographic(instance As CustomerDemographic)
    End Sub
  Partial Private Sub DeleteCustomerDemographic(instance As CustomerDemographic)
    End Sub
  Partial Private Sub InsertCustomer(instance As Customer)
    End Sub
  Partial Private Sub UpdateCustomer(instance As Customer)
    End Sub
  Partial Private Sub DeleteCustomer(instance As Customer)
    End Sub
  Partial Private Sub InsertEmployee(instance As Employee)
    End Sub
  Partial Private Sub UpdateEmployee(instance As Employee)
    End Sub
  Partial Private Sub DeleteEmployee(instance As Employee)
    End Sub
  Partial Private Sub InsertEmployeeTerritory(instance As EmployeeTerritory)
    End Sub
  Partial Private Sub UpdateEmployeeTerritory(instance As EmployeeTerritory)
    End Sub
  Partial Private Sub DeleteEmployeeTerritory(instance As EmployeeTerritory)
    End Sub
  Partial Private Sub InsertLargeEmployee(instance As LargeEmployee)
    End Sub
  Partial Private Sub UpdateLargeEmployee(instance As LargeEmployee)
    End Sub
  Partial Private Sub DeleteLargeEmployee(instance As LargeEmployee)
    End Sub
  Partial Private Sub InsertOrder_Detail(instance As Order_Detail)
    End Sub
  Partial Private Sub UpdateOrder_Detail(instance As Order_Detail)
    End Sub
  Partial Private Sub DeleteOrder_Detail(instance As Order_Detail)
    End Sub
  Partial Private Sub InsertOrder(instance As [Order])
    End Sub
  Partial Private Sub UpdateOrder(instance As [Order])
    End Sub
  Partial Private Sub DeleteOrder(instance As [Order])
    End Sub
  Partial Private Sub InsertProduct(instance As Product)
    End Sub
  Partial Private Sub UpdateProduct(instance As Product)
    End Sub
  Partial Private Sub DeleteProduct(instance As Product)
    End Sub
  Partial Private Sub InsertRegion(instance As Region)
    End Sub
  Partial Private Sub UpdateRegion(instance As Region)
    End Sub
  Partial Private Sub DeleteRegion(instance As Region)
    End Sub
  Partial Private Sub InsertShipper(instance As Shipper)
    End Sub
  Partial Private Sub UpdateShipper(instance As Shipper)
    End Sub
  Partial Private Sub DeleteShipper(instance As Shipper)
    End Sub
  Partial Private Sub InsertSupplier(instance As Supplier)
    End Sub
  Partial Private Sub UpdateSupplier(instance As Supplier)
    End Sub
  Partial Private Sub DeleteSupplier(instance As Supplier)
    End Sub
  #End Region
	
	Public Sub New()
		MyBase.New(Global.System.Configuration.ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public ReadOnly Property Categories() As System.Data.Linq.Table(Of Category)
		Get
			Return Me.GetTable(Of Category)
		End Get
	End Property
	
	Public ReadOnly Property CustomerCustomerDemos() As System.Data.Linq.Table(Of CustomerCustomerDemo)
		Get
			Return Me.GetTable(Of CustomerCustomerDemo)
		End Get
	End Property
	
	Public ReadOnly Property Territories() As System.Data.Linq.Table(Of Territory)
		Get
			Return Me.GetTable(Of Territory)
		End Get
	End Property
	
	Public ReadOnly Property CustomerDemographics() As System.Data.Linq.Table(Of CustomerDemographic)
		Get
			Return Me.GetTable(Of CustomerDemographic)
		End Get
	End Property
	
	Public ReadOnly Property Customers() As System.Data.Linq.Table(Of Customer)
		Get
			Return Me.GetTable(Of Customer)
		End Get
	End Property
	
	Public ReadOnly Property Employees() As System.Data.Linq.Table(Of Employee)
		Get
			Return Me.GetTable(Of Employee)
		End Get
	End Property
	
	Public ReadOnly Property EmployeeTerritories() As System.Data.Linq.Table(Of EmployeeTerritory)
		Get
			Return Me.GetTable(Of EmployeeTerritory)
		End Get
	End Property
	
	Public ReadOnly Property LargeEmployees() As System.Data.Linq.Table(Of LargeEmployee)
		Get
			Return Me.GetTable(Of LargeEmployee)
		End Get
	End Property
	
	Public ReadOnly Property Order_Details() As System.Data.Linq.Table(Of Order_Detail)
		Get
			Return Me.GetTable(Of Order_Detail)
		End Get
	End Property
	
	Public ReadOnly Property Orders() As System.Data.Linq.Table(Of [Order])
		Get
			Return Me.GetTable(Of [Order])
		End Get
	End Property
	
	Public ReadOnly Property Products() As System.Data.Linq.Table(Of Product)
		Get
			Return Me.GetTable(Of Product)
		End Get
	End Property
	
	Public ReadOnly Property Regions() As System.Data.Linq.Table(Of Region)
		Get
			Return Me.GetTable(Of Region)
		End Get
	End Property
	
	Public ReadOnly Property Shippers() As System.Data.Linq.Table(Of Shipper)
		Get
			Return Me.GetTable(Of Shipper)
		End Get
	End Property
	
	Public ReadOnly Property Suppliers() As System.Data.Linq.Table(Of Supplier)
		Get
			Return Me.GetTable(Of Supplier)
		End Get
	End Property
End Class

<Table(Name:="dbo.Categories")>  _
Partial Public Class Category
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _CategoryID As Integer
	
	Private _CategoryName As String
	
	Private _Description As String
	
	Private _Picture As System.Data.Linq.Binary
	
	Private _Products As EntitySet(Of Product)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCategoryIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnCategoryIDChanged()
    End Sub
    Partial Private Sub OnCategoryNameChanging(value As String)
    End Sub
    Partial Private Sub OnCategoryNameChanged()
    End Sub
    Partial Private Sub OnDescriptionChanging(value As String)
    End Sub
    Partial Private Sub OnDescriptionChanged()
    End Sub
    Partial Private Sub OnPictureChanging(value As System.Data.Linq.Binary)
    End Sub
    Partial Private Sub OnPictureChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Products = New EntitySet(Of Product)(AddressOf Me.attach_Products, AddressOf Me.detach_Products)
		OnCreated
	End Sub
	
	<Column(Storage:="_CategoryID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property CategoryID() As Integer
		Get
			Return Me._CategoryID
		End Get
		Set
			If ((Me._CategoryID = value)  _
						= false) Then
				Me.OnCategoryIDChanging(value)
				Me.SendPropertyChanging
				Me._CategoryID = value
				Me.SendPropertyChanged("CategoryID")
				Me.OnCategoryIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CategoryName", DbType:="NVarChar(15) NOT NULL", CanBeNull:=false)>  _
	Public Property CategoryName() As String
		Get
			Return Me._CategoryName
		End Get
		Set
			If (String.Equals(Me._CategoryName, value) = false) Then
				Me.OnCategoryNameChanging(value)
				Me.SendPropertyChanging
				Me._CategoryName = value
				Me.SendPropertyChanged("CategoryName")
				Me.OnCategoryNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Description", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Description() As String
		Get
			Return Me._Description
		End Get
		Set
			If (String.Equals(Me._Description, value) = false) Then
				Me.OnDescriptionChanging(value)
				Me.SendPropertyChanging
				Me._Description = value
				Me.SendPropertyChanged("Description")
				Me.OnDescriptionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Picture", DbType:="Image", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Picture() As System.Data.Linq.Binary
		Get
			Return Me._Picture
		End Get
		Set
			If (Object.Equals(Me._Picture, value) = false) Then
				Me.OnPictureChanging(value)
				Me.SendPropertyChanging
				Me._Picture = value
				Me.SendPropertyChanged("Picture")
				Me.OnPictureChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Category_Product", Storage:="_Products", ThisKey:="CategoryID", OtherKey:="CategoryID")>  _
	Public Property Products() As EntitySet(Of Product)
		Get
			Return Me._Products
		End Get
		Set
			Me._Products.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Category = Me
	End Sub
	
	Private Sub detach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Category = Nothing
	End Sub
End Class

<Table(Name:="dbo.CustomerCustomerDemo")>  _
Partial Public Class CustomerCustomerDemo
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _CustomerID As String
	
	Private _CustomerTypeID As String
	
	Private _CustomerDemographic As EntityRef(Of CustomerDemographic)
	
	Private _Customer As EntityRef(Of Customer)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCustomerIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerIDChanged()
    End Sub
    Partial Private Sub OnCustomerTypeIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerTypeIDChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._CustomerDemographic = CType(Nothing, EntityRef(Of CustomerDemographic))
		Me._Customer = CType(Nothing, EntityRef(Of Customer))
		OnCreated
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				If Me._Customer.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnCustomerIDChanging(value)
				Me.SendPropertyChanging
				Me._CustomerID = value
				Me.SendPropertyChanged("CustomerID")
				Me.OnCustomerIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CustomerTypeID", DbType:="NChar(10) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property CustomerTypeID() As String
		Get
			Return Me._CustomerTypeID
		End Get
		Set
			If (String.Equals(Me._CustomerTypeID, value) = false) Then
				If Me._CustomerDemographic.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnCustomerTypeIDChanging(value)
				Me.SendPropertyChanging
				Me._CustomerTypeID = value
				Me.SendPropertyChanged("CustomerTypeID")
				Me.OnCustomerTypeIDChanged
			End If
		End Set
	End Property
	
	<Association(Name:="CustomerDemographic_CustomerCustomerDemo", Storage:="_CustomerDemographic", ThisKey:="CustomerTypeID", OtherKey:="CustomerTypeID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property CustomerDemographic() As CustomerDemographic
		Get
			Return Me._CustomerDemographic.Entity
		End Get
		Set
			Dim previousValue As CustomerDemographic = Me._CustomerDemographic.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._CustomerDemographic.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._CustomerDemographic.Entity = Nothing
					previousValue.CustomerCustomerDemos.Remove(Me)
				End If
				Me._CustomerDemographic.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.CustomerCustomerDemos.Add(Me)
					Me._CustomerTypeID = value.CustomerTypeID
				Else
					Me._CustomerTypeID = CType(Nothing, String)
				End If
				Me.SendPropertyChanged("CustomerDemographic")
			End If
		End Set
	End Property
	
	<Association(Name:="Customer_CustomerCustomerDemo", Storage:="_Customer", ThisKey:="CustomerID", OtherKey:="CustomerID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property Customer() As Customer
		Get
			Return Me._Customer.Entity
		End Get
		Set
			Dim previousValue As Customer = Me._Customer.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Customer.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Customer.Entity = Nothing
					previousValue.CustomerCustomerDemos.Remove(Me)
				End If
				Me._Customer.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.CustomerCustomerDemos.Add(Me)
					Me._CustomerID = value.CustomerID
				Else
					Me._CustomerID = CType(Nothing, String)
				End If
				Me.SendPropertyChanged("Customer")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
End Class

<Table(Name:="dbo.Territories")>  _
Partial Public Class Territory
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _TerritoryID As String
	
	Private _TerritoryDescription As String
	
	Private _RegionID As Integer
	
	Private _EmployeeTerritories As EntitySet(Of EmployeeTerritory)
	
	Private _Region As EntityRef(Of Region)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnTerritoryIDChanging(value As String)
    End Sub
    Partial Private Sub OnTerritoryIDChanged()
    End Sub
    Partial Private Sub OnTerritoryDescriptionChanging(value As String)
    End Sub
    Partial Private Sub OnTerritoryDescriptionChanged()
    End Sub
    Partial Private Sub OnRegionIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnRegionIDChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._EmployeeTerritories = New EntitySet(Of EmployeeTerritory)(AddressOf Me.attach_EmployeeTerritories, AddressOf Me.detach_EmployeeTerritories)
		Me._Region = CType(Nothing, EntityRef(Of Region))
		OnCreated
	End Sub
	
	<Column(Storage:="_TerritoryID", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property TerritoryID() As String
		Get
			Return Me._TerritoryID
		End Get
		Set
			If (String.Equals(Me._TerritoryID, value) = false) Then
				Me.OnTerritoryIDChanging(value)
				Me.SendPropertyChanging
				Me._TerritoryID = value
				Me.SendPropertyChanged("TerritoryID")
				Me.OnTerritoryIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TerritoryDescription", DbType:="NVarChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property TerritoryDescription() As String
		Get
			Return Me._TerritoryDescription
		End Get
		Set
			If (String.Equals(Me._TerritoryDescription, value) = false) Then
				Me.OnTerritoryDescriptionChanging(value)
				Me.SendPropertyChanging
				Me._TerritoryDescription = value
				Me.SendPropertyChanged("TerritoryDescription")
				Me.OnTerritoryDescriptionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_RegionID", DbType:="Int NOT NULL")>  _
	Public Property RegionID() As Integer
		Get
			Return Me._RegionID
		End Get
		Set
			If ((Me._RegionID = value)  _
						= false) Then
				If Me._Region.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnRegionIDChanging(value)
				Me.SendPropertyChanging
				Me._RegionID = value
				Me.SendPropertyChanged("RegionID")
				Me.OnRegionIDChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Territory_EmployeeTerritory", Storage:="_EmployeeTerritories", ThisKey:="TerritoryID", OtherKey:="TerritoryID")>  _
	Public Property EmployeeTerritories() As EntitySet(Of EmployeeTerritory)
		Get
			Return Me._EmployeeTerritories
		End Get
		Set
			Me._EmployeeTerritories.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Region_Territory", Storage:="_Region", ThisKey:="RegionID", OtherKey:="RegionID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property Region() As Region
		Get
			Return Me._Region.Entity
		End Get
		Set
			Dim previousValue As Region = Me._Region.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Region.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Region.Entity = Nothing
					previousValue.Territories.Remove(Me)
				End If
				Me._Region.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Territories.Add(Me)
					Me._RegionID = value.RegionID
				Else
					Me._RegionID = CType(Nothing, Integer)
				End If
				Me.SendPropertyChanged("Region")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Territory = Me
	End Sub
	
	Private Sub detach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Territory = Nothing
	End Sub
End Class

<Table(Name:="dbo.CustomerDemographics")>  _
Partial Public Class CustomerDemographic
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _CustomerTypeID As String
	
	Private _CustomerDesc As String
	
	Private _CustomerCustomerDemos As EntitySet(Of CustomerCustomerDemo)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCustomerTypeIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerTypeIDChanged()
    End Sub
    Partial Private Sub OnCustomerDescChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerDescChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._CustomerCustomerDemos = New EntitySet(Of CustomerCustomerDemo)(AddressOf Me.attach_CustomerCustomerDemos, AddressOf Me.detach_CustomerCustomerDemos)
		OnCreated
	End Sub
	
	<Column(Storage:="_CustomerTypeID", DbType:="NChar(10) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property CustomerTypeID() As String
		Get
			Return Me._CustomerTypeID
		End Get
		Set
			If (String.Equals(Me._CustomerTypeID, value) = false) Then
				Me.OnCustomerTypeIDChanging(value)
				Me.SendPropertyChanging
				Me._CustomerTypeID = value
				Me.SendPropertyChanged("CustomerTypeID")
				Me.OnCustomerTypeIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CustomerDesc", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property CustomerDesc() As String
		Get
			Return Me._CustomerDesc
		End Get
		Set
			If (String.Equals(Me._CustomerDesc, value) = false) Then
				Me.OnCustomerDescChanging(value)
				Me.SendPropertyChanging
				Me._CustomerDesc = value
				Me.SendPropertyChanged("CustomerDesc")
				Me.OnCustomerDescChanged
			End If
		End Set
	End Property
	
	<Association(Name:="CustomerDemographic_CustomerCustomerDemo", Storage:="_CustomerCustomerDemos", ThisKey:="CustomerTypeID", OtherKey:="CustomerTypeID")>  _
	Public Property CustomerCustomerDemos() As EntitySet(Of CustomerCustomerDemo)
		Get
			Return Me._CustomerCustomerDemos
		End Get
		Set
			Me._CustomerCustomerDemos.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.CustomerDemographic = Me
	End Sub
	
	Private Sub detach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.CustomerDemographic = Nothing
	End Sub
End Class

<Table(Name:="dbo.Customers")>  _
Partial Public Class Customer
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _CustomerID As String
	
	Private _CompanyName As String
	
	Private _ContactName As String
	
	Private _ContactTitle As String
	
	Private _Address As String
	
	Private _City As String
	
	Private _Region As String
	
	Private _PostalCode As String
	
	Private _Country As String
	
	Private _Phone As String
	
	Private _Fax As String
	
	Private _Bool As System.Nullable(Of Boolean)
	
	Private _CustomerCustomerDemos As EntitySet(Of CustomerCustomerDemo)
	
	Private _Orders As EntitySet(Of [Order])
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCustomerIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerIDChanged()
    End Sub
    Partial Private Sub OnCompanyNameChanging(value As String)
    End Sub
    Partial Private Sub OnCompanyNameChanged()
    End Sub
    Partial Private Sub OnContactNameChanging(value As String)
    End Sub
    Partial Private Sub OnContactNameChanged()
    End Sub
    Partial Private Sub OnContactTitleChanging(value As String)
    End Sub
    Partial Private Sub OnContactTitleChanged()
    End Sub
    Partial Private Sub OnAddressChanging(value As String)
    End Sub
    Partial Private Sub OnAddressChanged()
    End Sub
    Partial Private Sub OnCityChanging(value As String)
    End Sub
    Partial Private Sub OnCityChanged()
    End Sub
    Partial Private Sub OnRegionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionChanged()
    End Sub
    Partial Private Sub OnPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnPostalCodeChanged()
    End Sub
    Partial Private Sub OnCountryChanging(value As String)
    End Sub
    Partial Private Sub OnCountryChanged()
    End Sub
    Partial Private Sub OnPhoneChanging(value As String)
    End Sub
    Partial Private Sub OnPhoneChanged()
    End Sub
    Partial Private Sub OnFaxChanging(value As String)
    End Sub
    Partial Private Sub OnFaxChanged()
    End Sub
    Partial Private Sub OnBoolChanging(value As System.Nullable(Of Boolean))
    End Sub
    Partial Private Sub OnBoolChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._CustomerCustomerDemos = New EntitySet(Of CustomerCustomerDemo)(AddressOf Me.attach_CustomerCustomerDemos, AddressOf Me.detach_CustomerCustomerDemos)
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
		OnCreated
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				Me.OnCustomerIDChanging(value)
				Me.SendPropertyChanging
				Me._CustomerID = value
				Me.SendPropertyChanged("CustomerID")
				Me.OnCustomerIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CompanyName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property CompanyName() As String
		Get
			Return Me._CompanyName
		End Get
		Set
			If (String.Equals(Me._CompanyName, value) = false) Then
				Me.OnCompanyNameChanging(value)
				Me.SendPropertyChanging
				Me._CompanyName = value
				Me.SendPropertyChanged("CompanyName")
				Me.OnCompanyNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ContactName", DbType:="NVarChar(30)")>  _
	Public Property ContactName() As String
		Get
			Return Me._ContactName
		End Get
		Set
			If (String.Equals(Me._ContactName, value) = false) Then
				Me.OnContactNameChanging(value)
				Me.SendPropertyChanging
				Me._ContactName = value
				Me.SendPropertyChanged("ContactName")
				Me.OnContactNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ContactTitle", DbType:="NVarChar(30)")>  _
	Public Property ContactTitle() As String
		Get
			Return Me._ContactTitle
		End Get
		Set
			If (String.Equals(Me._ContactTitle, value) = false) Then
				Me.OnContactTitleChanging(value)
				Me.SendPropertyChanging
				Me._ContactTitle = value
				Me.SendPropertyChanged("ContactTitle")
				Me.OnContactTitleChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Address", DbType:="NVarChar(60)")>  _
	Public Property Address() As String
		Get
			Return Me._Address
		End Get
		Set
			If (String.Equals(Me._Address, value) = false) Then
				Me.OnAddressChanging(value)
				Me.SendPropertyChanging
				Me._Address = value
				Me.SendPropertyChanged("Address")
				Me.OnAddressChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_City", DbType:="NVarChar(15)")>  _
	Public Property City() As String
		Get
			Return Me._City
		End Get
		Set
			If (String.Equals(Me._City, value) = false) Then
				Me.OnCityChanging(value)
				Me.SendPropertyChanging
				Me._City = value
				Me.SendPropertyChanged("City")
				Me.OnCityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Region", DbType:="NVarChar(15)")>  _
	Public Property Region() As String
		Get
			Return Me._Region
		End Get
		Set
			If (String.Equals(Me._Region, value) = false) Then
				Me.OnRegionChanging(value)
				Me.SendPropertyChanging
				Me._Region = value
				Me.SendPropertyChanged("Region")
				Me.OnRegionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PostalCode", DbType:="NVarChar(10)")>  _
	Public Property PostalCode() As String
		Get
			Return Me._PostalCode
		End Get
		Set
			If (String.Equals(Me._PostalCode, value) = false) Then
				Me.OnPostalCodeChanging(value)
				Me.SendPropertyChanging
				Me._PostalCode = value
				Me.SendPropertyChanged("PostalCode")
				Me.OnPostalCodeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Country", DbType:="NVarChar(15)")>  _
	Public Property Country() As String
		Get
			Return Me._Country
		End Get
		Set
			If (String.Equals(Me._Country, value) = false) Then
				Me.OnCountryChanging(value)
				Me.SendPropertyChanging
				Me._Country = value
				Me.SendPropertyChanged("Country")
				Me.OnCountryChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Phone", DbType:="NVarChar(24)")>  _
	Public Property Phone() As String
		Get
			Return Me._Phone
		End Get
		Set
			If (String.Equals(Me._Phone, value) = false) Then
				Me.OnPhoneChanging(value)
				Me.SendPropertyChanging
				Me._Phone = value
				Me.SendPropertyChanged("Phone")
				Me.OnPhoneChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Fax", DbType:="NVarChar(24)")>  _
	Public Property Fax() As String
		Get
			Return Me._Fax
		End Get
		Set
			If (String.Equals(Me._Fax, value) = false) Then
				Me.OnFaxChanging(value)
				Me.SendPropertyChanging
				Me._Fax = value
				Me.SendPropertyChanged("Fax")
				Me.OnFaxChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Bool", DbType:="Bit")>  _
	Public Property Bool() As System.Nullable(Of Boolean)
		Get
			Return Me._Bool
		End Get
		Set
			If (Me._Bool.Equals(value) = false) Then
				Me.OnBoolChanging(value)
				Me.SendPropertyChanging
				Me._Bool = value
				Me.SendPropertyChanged("Bool")
				Me.OnBoolChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Customer_CustomerCustomerDemo", Storage:="_CustomerCustomerDemos", ThisKey:="CustomerID", OtherKey:="CustomerID")>  _
	Public Property CustomerCustomerDemos() As EntitySet(Of CustomerCustomerDemo)
		Get
			Return Me._CustomerCustomerDemos
		End Get
		Set
			Me._CustomerCustomerDemos.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Customer_Order", Storage:="_Orders", ThisKey:="CustomerID", OtherKey:="CustomerID")>  _
	Public Property Orders() As EntitySet(Of [Order])
		Get
			Return Me._Orders
		End Get
		Set
			Me._Orders.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.Customer = Me
	End Sub
	
	Private Sub detach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.Customer = Nothing
	End Sub
	
	Private Sub attach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Customer = Me
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Customer = Nothing
	End Sub
End Class

<Table(Name:="dbo.Employees")>  _
Partial Public Class Employee
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _EmployeeID As Integer
	
	Private _LastName As String
	
	Private _FirstName As String
	
	Private _Title As String
	
	Private _TitleOfCourtesy As String
	
	Private _BirthDate As System.Nullable(Of Date)
	
	Private _HireDate As System.Nullable(Of Date)
	
	Private _Address As String
	
	Private _City As String
	
	Private _Region As String
	
	Private _PostalCode As String
	
	Private _Country As String
	
	Private _HomePhone As String
	
	Private _Extension As String
	
	Private _Photo As System.Data.Linq.Binary
	
	Private _Notes As String
	
	Private _ReportsTo As System.Nullable(Of Integer)
	
	Private _PhotoPath As String
	
	Private _Employees As EntitySet(Of Employee)
	
	Private _EmployeeTerritories As EntitySet(Of EmployeeTerritory)
	
	Private _Orders As EntitySet(Of [Order])
	
	Private _Employee As EntityRef(Of Employee)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnEmployeeIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnEmployeeIDChanged()
    End Sub
    Partial Private Sub OnLastNameChanging(value As String)
    End Sub
    Partial Private Sub OnLastNameChanged()
    End Sub
    Partial Private Sub OnFirstNameChanging(value As String)
    End Sub
    Partial Private Sub OnFirstNameChanged()
    End Sub
    Partial Private Sub OnTitleChanging(value As String)
    End Sub
    Partial Private Sub OnTitleChanged()
    End Sub
    Partial Private Sub OnTitleOfCourtesyChanging(value As String)
    End Sub
    Partial Private Sub OnTitleOfCourtesyChanged()
    End Sub
    Partial Private Sub OnBirthDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnBirthDateChanged()
    End Sub
    Partial Private Sub OnHireDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnHireDateChanged()
    End Sub
    Partial Private Sub OnAddressChanging(value As String)
    End Sub
    Partial Private Sub OnAddressChanged()
    End Sub
    Partial Private Sub OnCityChanging(value As String)
    End Sub
    Partial Private Sub OnCityChanged()
    End Sub
    Partial Private Sub OnRegionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionChanged()
    End Sub
    Partial Private Sub OnPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnPostalCodeChanged()
    End Sub
    Partial Private Sub OnCountryChanging(value As String)
    End Sub
    Partial Private Sub OnCountryChanged()
    End Sub
    Partial Private Sub OnHomePhoneChanging(value As String)
    End Sub
    Partial Private Sub OnHomePhoneChanged()
    End Sub
    Partial Private Sub OnExtensionChanging(value As String)
    End Sub
    Partial Private Sub OnExtensionChanged()
    End Sub
    Partial Private Sub OnPhotoChanging(value As System.Data.Linq.Binary)
    End Sub
    Partial Private Sub OnPhotoChanged()
    End Sub
    Partial Private Sub OnNotesChanging(value As String)
    End Sub
    Partial Private Sub OnNotesChanged()
    End Sub
    Partial Private Sub OnReportsToChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnReportsToChanged()
    End Sub
    Partial Private Sub OnPhotoPathChanging(value As String)
    End Sub
    Partial Private Sub OnPhotoPathChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Employees = New EntitySet(Of Employee)(AddressOf Me.attach_Employees, AddressOf Me.detach_Employees)
		Me._EmployeeTerritories = New EntitySet(Of EmployeeTerritory)(AddressOf Me.attach_EmployeeTerritories, AddressOf Me.detach_EmployeeTerritories)
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
		OnCreated
	End Sub
	
	<Column(Storage:="_EmployeeID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property EmployeeID() As Integer
		Get
			Return Me._EmployeeID
		End Get
		Set
			If ((Me._EmployeeID = value)  _
						= false) Then
				Me.OnEmployeeIDChanging(value)
				Me.SendPropertyChanging
				Me._EmployeeID = value
				Me.SendPropertyChanged("EmployeeID")
				Me.OnEmployeeIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LastName", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property LastName() As String
		Get
			Return Me._LastName
		End Get
		Set
			If (String.Equals(Me._LastName, value) = false) Then
				Me.OnLastNameChanging(value)
				Me.SendPropertyChanging
				Me._LastName = value
				Me.SendPropertyChanged("LastName")
				Me.OnLastNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FirstName", DbType:="NVarChar(10) NOT NULL", CanBeNull:=false)>  _
	Public Property FirstName() As String
		Get
			Return Me._FirstName
		End Get
		Set
			If (String.Equals(Me._FirstName, value) = false) Then
				Me.OnFirstNameChanging(value)
				Me.SendPropertyChanging
				Me._FirstName = value
				Me.SendPropertyChanged("FirstName")
				Me.OnFirstNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Title", DbType:="NVarChar(30)")>  _
	Public Property Title() As String
		Get
			Return Me._Title
		End Get
		Set
			If (String.Equals(Me._Title, value) = false) Then
				Me.OnTitleChanging(value)
				Me.SendPropertyChanging
				Me._Title = value
				Me.SendPropertyChanged("Title")
				Me.OnTitleChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TitleOfCourtesy", DbType:="NVarChar(25)")>  _
	Public Property TitleOfCourtesy() As String
		Get
			Return Me._TitleOfCourtesy
		End Get
		Set
			If (String.Equals(Me._TitleOfCourtesy, value) = false) Then
				Me.OnTitleOfCourtesyChanging(value)
				Me.SendPropertyChanging
				Me._TitleOfCourtesy = value
				Me.SendPropertyChanged("TitleOfCourtesy")
				Me.OnTitleOfCourtesyChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_BirthDate", DbType:="DateTime")>  _
	Public Property BirthDate() As System.Nullable(Of Date)
		Get
			Return Me._BirthDate
		End Get
		Set
			If (Me._BirthDate.Equals(value) = false) Then
				Me.OnBirthDateChanging(value)
				Me.SendPropertyChanging
				Me._BirthDate = value
				Me.SendPropertyChanged("BirthDate")
				Me.OnBirthDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HireDate", DbType:="DateTime")>  _
	Public Property HireDate() As System.Nullable(Of Date)
		Get
			Return Me._HireDate
		End Get
		Set
			If (Me._HireDate.Equals(value) = false) Then
				Me.OnHireDateChanging(value)
				Me.SendPropertyChanging
				Me._HireDate = value
				Me.SendPropertyChanged("HireDate")
				Me.OnHireDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Address", DbType:="NVarChar(60)")>  _
	Public Property Address() As String
		Get
			Return Me._Address
		End Get
		Set
			If (String.Equals(Me._Address, value) = false) Then
				Me.OnAddressChanging(value)
				Me.SendPropertyChanging
				Me._Address = value
				Me.SendPropertyChanged("Address")
				Me.OnAddressChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_City", DbType:="NVarChar(15)")>  _
	Public Property City() As String
		Get
			Return Me._City
		End Get
		Set
			If (String.Equals(Me._City, value) = false) Then
				Me.OnCityChanging(value)
				Me.SendPropertyChanging
				Me._City = value
				Me.SendPropertyChanged("City")
				Me.OnCityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Region", DbType:="NVarChar(15)")>  _
	Public Property Region() As String
		Get
			Return Me._Region
		End Get
		Set
			If (String.Equals(Me._Region, value) = false) Then
				Me.OnRegionChanging(value)
				Me.SendPropertyChanging
				Me._Region = value
				Me.SendPropertyChanged("Region")
				Me.OnRegionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PostalCode", DbType:="NVarChar(10)")>  _
	Public Property PostalCode() As String
		Get
			Return Me._PostalCode
		End Get
		Set
			If (String.Equals(Me._PostalCode, value) = false) Then
				Me.OnPostalCodeChanging(value)
				Me.SendPropertyChanging
				Me._PostalCode = value
				Me.SendPropertyChanged("PostalCode")
				Me.OnPostalCodeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Country", DbType:="NVarChar(15)")>  _
	Public Property Country() As String
		Get
			Return Me._Country
		End Get
		Set
			If (String.Equals(Me._Country, value) = false) Then
				Me.OnCountryChanging(value)
				Me.SendPropertyChanging
				Me._Country = value
				Me.SendPropertyChanged("Country")
				Me.OnCountryChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HomePhone", DbType:="NVarChar(24)")>  _
	Public Property HomePhone() As String
		Get
			Return Me._HomePhone
		End Get
		Set
			If (String.Equals(Me._HomePhone, value) = false) Then
				Me.OnHomePhoneChanging(value)
				Me.SendPropertyChanging
				Me._HomePhone = value
				Me.SendPropertyChanged("HomePhone")
				Me.OnHomePhoneChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Extension", DbType:="NVarChar(4)")>  _
	Public Property Extension() As String
		Get
			Return Me._Extension
		End Get
		Set
			If (String.Equals(Me._Extension, value) = false) Then
				Me.OnExtensionChanging(value)
				Me.SendPropertyChanging
				Me._Extension = value
				Me.SendPropertyChanged("Extension")
				Me.OnExtensionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Photo", DbType:="Image", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Photo() As System.Data.Linq.Binary
		Get
			Return Me._Photo
		End Get
		Set
			If (Object.Equals(Me._Photo, value) = false) Then
				Me.OnPhotoChanging(value)
				Me.SendPropertyChanging
				Me._Photo = value
				Me.SendPropertyChanged("Photo")
				Me.OnPhotoChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Notes", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Notes() As String
		Get
			Return Me._Notes
		End Get
		Set
			If (String.Equals(Me._Notes, value) = false) Then
				Me.OnNotesChanging(value)
				Me.SendPropertyChanging
				Me._Notes = value
				Me.SendPropertyChanged("Notes")
				Me.OnNotesChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ReportsTo", DbType:="Int")>  _
	Public Property ReportsTo() As System.Nullable(Of Integer)
		Get
			Return Me._ReportsTo
		End Get
		Set
			If (Me._ReportsTo.Equals(value) = false) Then
				If Me._Employee.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnReportsToChanging(value)
				Me.SendPropertyChanging
				Me._ReportsTo = value
				Me.SendPropertyChanged("ReportsTo")
				Me.OnReportsToChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PhotoPath", DbType:="NVarChar(255)")>  _
	Public Property PhotoPath() As String
		Get
			Return Me._PhotoPath
		End Get
		Set
			If (String.Equals(Me._PhotoPath, value) = false) Then
				Me.OnPhotoPathChanging(value)
				Me.SendPropertyChanging
				Me._PhotoPath = value
				Me.SendPropertyChanged("PhotoPath")
				Me.OnPhotoPathChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Employee_Employee", Storage:="_Employees", ThisKey:="EmployeeID", OtherKey:="ReportsTo")>  _
	Public Property Employees() As EntitySet(Of Employee)
		Get
			Return Me._Employees
		End Get
		Set
			Me._Employees.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Employee_EmployeeTerritory", Storage:="_EmployeeTerritories", ThisKey:="EmployeeID", OtherKey:="EmployeeID")>  _
	Public Property EmployeeTerritories() As EntitySet(Of EmployeeTerritory)
		Get
			Return Me._EmployeeTerritories
		End Get
		Set
			Me._EmployeeTerritories.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Employee_Order", Storage:="_Orders", ThisKey:="EmployeeID", OtherKey:="EmployeeID")>  _
	Public Property Orders() As EntitySet(Of [Order])
		Get
			Return Me._Orders
		End Get
		Set
			Me._Orders.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Employee_Employee", Storage:="_Employee", ThisKey:="ReportsTo", OtherKey:="EmployeeID", IsForeignKey:=true)>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Employee.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Employee.Entity = Nothing
					previousValue.Employees.Remove(Me)
				End If
				Me._Employee.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Employees.Add(Me)
					Me._ReportsTo = value.EmployeeID
				Else
					Me._ReportsTo = CType(Nothing, Nullable(Of Integer))
				End If
				Me.SendPropertyChanged("Employee")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Employees(ByVal entity As Employee)
		Me.SendPropertyChanging
		entity.Employee = Me
	End Sub
	
	Private Sub detach_Employees(ByVal entity As Employee)
		Me.SendPropertyChanging
		entity.Employee = Nothing
	End Sub
	
	Private Sub attach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Employee = Me
	End Sub
	
	Private Sub detach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Employee = Nothing
	End Sub
	
	Private Sub attach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Employee = Me
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Employee = Nothing
	End Sub
End Class

<Table(Name:="dbo.EmployeeTerritories")>  _
Partial Public Class EmployeeTerritory
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _EmployeeID As Integer
	
	Private _TerritoryID As String
	
	Private _Employee As EntityRef(Of Employee)
	
	Private _Territory As EntityRef(Of Territory)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnEmployeeIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnEmployeeIDChanged()
    End Sub
    Partial Private Sub OnTerritoryIDChanging(value As String)
    End Sub
    Partial Private Sub OnTerritoryIDChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
		Me._Territory = CType(Nothing, EntityRef(Of Territory))
		OnCreated
	End Sub
	
	<Column(Storage:="_EmployeeID", DbType:="Int NOT NULL", IsPrimaryKey:=true)>  _
	Public Property EmployeeID() As Integer
		Get
			Return Me._EmployeeID
		End Get
		Set
			If ((Me._EmployeeID = value)  _
						= false) Then
				If Me._Employee.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnEmployeeIDChanging(value)
				Me.SendPropertyChanging
				Me._EmployeeID = value
				Me.SendPropertyChanged("EmployeeID")
				Me.OnEmployeeIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TerritoryID", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false, IsPrimaryKey:=true)>  _
	Public Property TerritoryID() As String
		Get
			Return Me._TerritoryID
		End Get
		Set
			If (String.Equals(Me._TerritoryID, value) = false) Then
				If Me._Territory.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnTerritoryIDChanging(value)
				Me.SendPropertyChanging
				Me._TerritoryID = value
				Me.SendPropertyChanged("TerritoryID")
				Me.OnTerritoryIDChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Employee_EmployeeTerritory", Storage:="_Employee", ThisKey:="EmployeeID", OtherKey:="EmployeeID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Employee.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Employee.Entity = Nothing
					previousValue.EmployeeTerritories.Remove(Me)
				End If
				Me._Employee.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.EmployeeTerritories.Add(Me)
					Me._EmployeeID = value.EmployeeID
				Else
					Me._EmployeeID = CType(Nothing, Integer)
				End If
				Me.SendPropertyChanged("Employee")
			End If
		End Set
	End Property
	
	<Association(Name:="Territory_EmployeeTerritory", Storage:="_Territory", ThisKey:="TerritoryID", OtherKey:="TerritoryID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property Territory() As Territory
		Get
			Return Me._Territory.Entity
		End Get
		Set
			Dim previousValue As Territory = Me._Territory.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Territory.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Territory.Entity = Nothing
					previousValue.EmployeeTerritories.Remove(Me)
				End If
				Me._Territory.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.EmployeeTerritories.Add(Me)
					Me._TerritoryID = value.TerritoryID
				Else
					Me._TerritoryID = CType(Nothing, String)
				End If
				Me.SendPropertyChanged("Territory")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
End Class

<Table(Name:="dbo.LargeEmployees")>  _
Partial Public Class LargeEmployee
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _EmployeeID As Integer
	
	Private _LastName As String
	
	Private _FirstName As String
	
	Private _Title As String
	
	Private _TitleOfCourtesy As String
	
	Private _BirthDate As System.Nullable(Of Date)
	
	Private _HireDate As System.Nullable(Of Date)
	
	Private _Address As String
	
	Private _City As String
	
	Private _Region As String
	
	Private _PostalCode As String
	
	Private _Country As String
	
	Private _HomePhone As String
	
	Private _Extension As String
	
	Private _Photo As System.Data.Linq.Binary
	
	Private _Notes As String
	
	Private _ReportsTo As System.Nullable(Of Integer)
	
	Private _PhotoPath As String
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnEmployeeIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnEmployeeIDChanged()
    End Sub
    Partial Private Sub OnLastNameChanging(value As String)
    End Sub
    Partial Private Sub OnLastNameChanged()
    End Sub
    Partial Private Sub OnFirstNameChanging(value As String)
    End Sub
    Partial Private Sub OnFirstNameChanged()
    End Sub
    Partial Private Sub OnTitleChanging(value As String)
    End Sub
    Partial Private Sub OnTitleChanged()
    End Sub
    Partial Private Sub OnTitleOfCourtesyChanging(value As String)
    End Sub
    Partial Private Sub OnTitleOfCourtesyChanged()
    End Sub
    Partial Private Sub OnBirthDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnBirthDateChanged()
    End Sub
    Partial Private Sub OnHireDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnHireDateChanged()
    End Sub
    Partial Private Sub OnAddressChanging(value As String)
    End Sub
    Partial Private Sub OnAddressChanged()
    End Sub
    Partial Private Sub OnCityChanging(value As String)
    End Sub
    Partial Private Sub OnCityChanged()
    End Sub
    Partial Private Sub OnRegionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionChanged()
    End Sub
    Partial Private Sub OnPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnPostalCodeChanged()
    End Sub
    Partial Private Sub OnCountryChanging(value As String)
    End Sub
    Partial Private Sub OnCountryChanged()
    End Sub
    Partial Private Sub OnHomePhoneChanging(value As String)
    End Sub
    Partial Private Sub OnHomePhoneChanged()
    End Sub
    Partial Private Sub OnExtensionChanging(value As String)
    End Sub
    Partial Private Sub OnExtensionChanged()
    End Sub
    Partial Private Sub OnPhotoChanging(value As System.Data.Linq.Binary)
    End Sub
    Partial Private Sub OnPhotoChanged()
    End Sub
    Partial Private Sub OnNotesChanging(value As String)
    End Sub
    Partial Private Sub OnNotesChanged()
    End Sub
    Partial Private Sub OnReportsToChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnReportsToChanged()
    End Sub
    Partial Private Sub OnPhotoPathChanging(value As String)
    End Sub
    Partial Private Sub OnPhotoPathChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
	End Sub
	
	<Column(Storage:="_EmployeeID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property EmployeeID() As Integer
		Get
			Return Me._EmployeeID
		End Get
		Set
			If ((Me._EmployeeID = value)  _
						= false) Then
				Me.OnEmployeeIDChanging(value)
				Me.SendPropertyChanging
				Me._EmployeeID = value
				Me.SendPropertyChanged("EmployeeID")
				Me.OnEmployeeIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_LastName", DbType:="NVarChar(20) NOT NULL", CanBeNull:=false)>  _
	Public Property LastName() As String
		Get
			Return Me._LastName
		End Get
		Set
			If (String.Equals(Me._LastName, value) = false) Then
				Me.OnLastNameChanging(value)
				Me.SendPropertyChanging
				Me._LastName = value
				Me.SendPropertyChanged("LastName")
				Me.OnLastNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_FirstName", DbType:="NVarChar(10) NOT NULL", CanBeNull:=false)>  _
	Public Property FirstName() As String
		Get
			Return Me._FirstName
		End Get
		Set
			If (String.Equals(Me._FirstName, value) = false) Then
				Me.OnFirstNameChanging(value)
				Me.SendPropertyChanging
				Me._FirstName = value
				Me.SendPropertyChanged("FirstName")
				Me.OnFirstNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Title", DbType:="NVarChar(30)")>  _
	Public Property Title() As String
		Get
			Return Me._Title
		End Get
		Set
			If (String.Equals(Me._Title, value) = false) Then
				Me.OnTitleChanging(value)
				Me.SendPropertyChanging
				Me._Title = value
				Me.SendPropertyChanged("Title")
				Me.OnTitleChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_TitleOfCourtesy", DbType:="NVarChar(25)")>  _
	Public Property TitleOfCourtesy() As String
		Get
			Return Me._TitleOfCourtesy
		End Get
		Set
			If (String.Equals(Me._TitleOfCourtesy, value) = false) Then
				Me.OnTitleOfCourtesyChanging(value)
				Me.SendPropertyChanging
				Me._TitleOfCourtesy = value
				Me.SendPropertyChanged("TitleOfCourtesy")
				Me.OnTitleOfCourtesyChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_BirthDate", DbType:="DateTime")>  _
	Public Property BirthDate() As System.Nullable(Of Date)
		Get
			Return Me._BirthDate
		End Get
		Set
			If (Me._BirthDate.Equals(value) = false) Then
				Me.OnBirthDateChanging(value)
				Me.SendPropertyChanging
				Me._BirthDate = value
				Me.SendPropertyChanged("BirthDate")
				Me.OnBirthDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HireDate", DbType:="DateTime")>  _
	Public Property HireDate() As System.Nullable(Of Date)
		Get
			Return Me._HireDate
		End Get
		Set
			If (Me._HireDate.Equals(value) = false) Then
				Me.OnHireDateChanging(value)
				Me.SendPropertyChanging
				Me._HireDate = value
				Me.SendPropertyChanged("HireDate")
				Me.OnHireDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Address", DbType:="NVarChar(60)")>  _
	Public Property Address() As String
		Get
			Return Me._Address
		End Get
		Set
			If (String.Equals(Me._Address, value) = false) Then
				Me.OnAddressChanging(value)
				Me.SendPropertyChanging
				Me._Address = value
				Me.SendPropertyChanged("Address")
				Me.OnAddressChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_City", DbType:="NVarChar(15)")>  _
	Public Property City() As String
		Get
			Return Me._City
		End Get
		Set
			If (String.Equals(Me._City, value) = false) Then
				Me.OnCityChanging(value)
				Me.SendPropertyChanging
				Me._City = value
				Me.SendPropertyChanged("City")
				Me.OnCityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Region", DbType:="NVarChar(15)")>  _
	Public Property Region() As String
		Get
			Return Me._Region
		End Get
		Set
			If (String.Equals(Me._Region, value) = false) Then
				Me.OnRegionChanging(value)
				Me.SendPropertyChanging
				Me._Region = value
				Me.SendPropertyChanged("Region")
				Me.OnRegionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PostalCode", DbType:="NVarChar(10)")>  _
	Public Property PostalCode() As String
		Get
			Return Me._PostalCode
		End Get
		Set
			If (String.Equals(Me._PostalCode, value) = false) Then
				Me.OnPostalCodeChanging(value)
				Me.SendPropertyChanging
				Me._PostalCode = value
				Me.SendPropertyChanged("PostalCode")
				Me.OnPostalCodeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Country", DbType:="NVarChar(15)")>  _
	Public Property Country() As String
		Get
			Return Me._Country
		End Get
		Set
			If (String.Equals(Me._Country, value) = false) Then
				Me.OnCountryChanging(value)
				Me.SendPropertyChanging
				Me._Country = value
				Me.SendPropertyChanged("Country")
				Me.OnCountryChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HomePhone", DbType:="NVarChar(24)")>  _
	Public Property HomePhone() As String
		Get
			Return Me._HomePhone
		End Get
		Set
			If (String.Equals(Me._HomePhone, value) = false) Then
				Me.OnHomePhoneChanging(value)
				Me.SendPropertyChanging
				Me._HomePhone = value
				Me.SendPropertyChanged("HomePhone")
				Me.OnHomePhoneChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Extension", DbType:="NVarChar(4)")>  _
	Public Property Extension() As String
		Get
			Return Me._Extension
		End Get
		Set
			If (String.Equals(Me._Extension, value) = false) Then
				Me.OnExtensionChanging(value)
				Me.SendPropertyChanging
				Me._Extension = value
				Me.SendPropertyChanged("Extension")
				Me.OnExtensionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Photo", DbType:="Image", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Photo() As System.Data.Linq.Binary
		Get
			Return Me._Photo
		End Get
		Set
			If (Object.Equals(Me._Photo, value) = false) Then
				Me.OnPhotoChanging(value)
				Me.SendPropertyChanging
				Me._Photo = value
				Me.SendPropertyChanged("Photo")
				Me.OnPhotoChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Notes", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Notes() As String
		Get
			Return Me._Notes
		End Get
		Set
			If (String.Equals(Me._Notes, value) = false) Then
				Me.OnNotesChanging(value)
				Me.SendPropertyChanging
				Me._Notes = value
				Me.SendPropertyChanged("Notes")
				Me.OnNotesChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ReportsTo", DbType:="Int")>  _
	Public Property ReportsTo() As System.Nullable(Of Integer)
		Get
			Return Me._ReportsTo
		End Get
		Set
			If (Me._ReportsTo.Equals(value) = false) Then
				Me.OnReportsToChanging(value)
				Me.SendPropertyChanging
				Me._ReportsTo = value
				Me.SendPropertyChanged("ReportsTo")
				Me.OnReportsToChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PhotoPath", DbType:="NVarChar(255)")>  _
	Public Property PhotoPath() As String
		Get
			Return Me._PhotoPath
		End Get
		Set
			If (String.Equals(Me._PhotoPath, value) = false) Then
				Me.OnPhotoPathChanging(value)
				Me.SendPropertyChanging
				Me._PhotoPath = value
				Me.SendPropertyChanged("PhotoPath")
				Me.OnPhotoPathChanged
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
End Class

<Table(Name:="dbo.[Order Details]")>  _
Partial Public Class Order_Detail
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _OrderID As Integer
	
	Private _ProductID As Integer
	
	Private _UnitPrice As Decimal
	
	Private _Quantity As Short
	
	Private _Discount As Single
	
	Private _Order As EntityRef(Of [Order])
	
	Private _Product As EntityRef(Of Product)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnOrderIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnOrderIDChanged()
    End Sub
    Partial Private Sub OnProductIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnProductIDChanged()
    End Sub
    Partial Private Sub OnUnitPriceChanging(value As Decimal)
    End Sub
    Partial Private Sub OnUnitPriceChanged()
    End Sub
    Partial Private Sub OnQuantityChanging(value As Short)
    End Sub
    Partial Private Sub OnQuantityChanged()
    End Sub
    Partial Private Sub OnDiscountChanging(value As Single)
    End Sub
    Partial Private Sub OnDiscountChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Order = CType(Nothing, EntityRef(Of [Order]))
		Me._Product = CType(Nothing, EntityRef(Of Product))
		OnCreated
	End Sub
	
	<Column(Storage:="_OrderID", DbType:="Int NOT NULL", IsPrimaryKey:=true)>  _
	Public Property OrderID() As Integer
		Get
			Return Me._OrderID
		End Get
		Set
			If ((Me._OrderID = value)  _
						= false) Then
				If Me._Order.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnOrderIDChanging(value)
				Me.SendPropertyChanging
				Me._OrderID = value
				Me.SendPropertyChanged("OrderID")
				Me.OnOrderIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ProductID", DbType:="Int NOT NULL", IsPrimaryKey:=true)>  _
	Public Property ProductID() As Integer
		Get
			Return Me._ProductID
		End Get
		Set
			If ((Me._ProductID = value)  _
						= false) Then
				If Me._Product.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnProductIDChanging(value)
				Me.SendPropertyChanging
				Me._ProductID = value
				Me.SendPropertyChanged("ProductID")
				Me.OnProductIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UnitPrice", DbType:="Decimal(5,2) NOT NULL")>  _
	Public Property UnitPrice() As Decimal
		Get
			Return Me._UnitPrice
		End Get
		Set
			If ((Me._UnitPrice = value)  _
						= false) Then
				Me.OnUnitPriceChanging(value)
				Me.SendPropertyChanging
				Me._UnitPrice = value
				Me.SendPropertyChanged("UnitPrice")
				Me.OnUnitPriceChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Quantity", DbType:="SmallInt NOT NULL")>  _
	Public Property Quantity() As Short
		Get
			Return Me._Quantity
		End Get
		Set
			If ((Me._Quantity = value)  _
						= false) Then
				Me.OnQuantityChanging(value)
				Me.SendPropertyChanging
				Me._Quantity = value
				Me.SendPropertyChanged("Quantity")
				Me.OnQuantityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Discount", DbType:="Real NOT NULL")>  _
	Public Property Discount() As Single
		Get
			Return Me._Discount
		End Get
		Set
			If ((Me._Discount = value)  _
						= false) Then
				Me.OnDiscountChanging(value)
				Me.SendPropertyChanging
				Me._Discount = value
				Me.SendPropertyChanged("Discount")
				Me.OnDiscountChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Order_Order_Detail", Storage:="_Order", ThisKey:="OrderID", OtherKey:="OrderID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property [Order]() As [Order]
		Get
			Return Me._Order.Entity
		End Get
		Set
			Dim previousValue As [Order] = Me._Order.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Order.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Order.Entity = Nothing
					previousValue.Order_Details.Remove(Me)
				End If
				Me._Order.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Order_Details.Add(Me)
					Me._OrderID = value.OrderID
				Else
					Me._OrderID = CType(Nothing, Integer)
				End If
				Me.SendPropertyChanged("[Order]")
			End If
		End Set
	End Property
	
	<Association(Name:="Product_Order_Detail", Storage:="_Product", ThisKey:="ProductID", OtherKey:="ProductID", IsForeignKey:=true, DeleteOnNull:=true, DeleteRule:="CASCADE")>  _
	Public Property Product() As Product
		Get
			Return Me._Product.Entity
		End Get
		Set
			Dim previousValue As Product = Me._Product.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Product.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Product.Entity = Nothing
					previousValue.Order_Details.Remove(Me)
				End If
				Me._Product.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Order_Details.Add(Me)
					Me._ProductID = value.ProductID
				Else
					Me._ProductID = CType(Nothing, Integer)
				End If
				Me.SendPropertyChanged("Product")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
End Class

<Table(Name:="dbo.Orders")>  _
Partial Public Class [Order]
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _OrderID As Integer
	
	Private _CustomerID As String
	
	Private _EmployeeID As System.Nullable(Of Integer)
	
	Private _OrderDate As System.Nullable(Of Date)
	
	Private _RequiredDate As System.Nullable(Of Date)
	
	Private _ShippedDate As System.Nullable(Of Date)
	
	Private _ShipVia As System.Nullable(Of Integer)
	
	Private _Freight As System.Nullable(Of Decimal)
	
	Private _ShipName As String
	
	Private _ShipAddress As String
	
	Private _ShipCity As String
	
	Private _ShipRegion As String
	
	Private _ShipPostalCode As String
	
	Private _ShipCountry As String
	
	Private _Order_Details As EntitySet(Of Order_Detail)
	
	Private _Customer As EntityRef(Of Customer)
	
	Private _Employee As EntityRef(Of Employee)
	
	Private _Shipper As EntityRef(Of Shipper)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnOrderIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnOrderIDChanged()
    End Sub
    Partial Private Sub OnCustomerIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerIDChanged()
    End Sub
    Partial Private Sub OnEmployeeIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnEmployeeIDChanged()
    End Sub
    Partial Private Sub OnOrderDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnOrderDateChanged()
    End Sub
    Partial Private Sub OnRequiredDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnRequiredDateChanged()
    End Sub
    Partial Private Sub OnShippedDateChanging(value As System.Nullable(Of Date))
    End Sub
    Partial Private Sub OnShippedDateChanged()
    End Sub
    Partial Private Sub OnShipViaChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnShipViaChanged()
    End Sub
    Partial Private Sub OnFreightChanging(value As System.Nullable(Of Decimal))
    End Sub
    Partial Private Sub OnFreightChanged()
    End Sub
    Partial Private Sub OnShipNameChanging(value As String)
    End Sub
    Partial Private Sub OnShipNameChanged()
    End Sub
    Partial Private Sub OnShipAddressChanging(value As String)
    End Sub
    Partial Private Sub OnShipAddressChanged()
    End Sub
    Partial Private Sub OnShipCityChanging(value As String)
    End Sub
    Partial Private Sub OnShipCityChanged()
    End Sub
    Partial Private Sub OnShipRegionChanging(value As String)
    End Sub
    Partial Private Sub OnShipRegionChanged()
    End Sub
    Partial Private Sub OnShipPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnShipPostalCodeChanged()
    End Sub
    Partial Private Sub OnShipCountryChanging(value As String)
    End Sub
    Partial Private Sub OnShipCountryChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Order_Details = New EntitySet(Of Order_Detail)(AddressOf Me.attach_Order_Details, AddressOf Me.detach_Order_Details)
		Me._Customer = CType(Nothing, EntityRef(Of Customer))
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
		Me._Shipper = CType(Nothing, EntityRef(Of Shipper))
		OnCreated
	End Sub
	
	<Column(Storage:="_OrderID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property OrderID() As Integer
		Get
			Return Me._OrderID
		End Get
		Set
			If ((Me._OrderID = value)  _
						= false) Then
				Me.OnOrderIDChanging(value)
				Me.SendPropertyChanging
				Me._OrderID = value
				Me.SendPropertyChanged("OrderID")
				Me.OnOrderIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5)")>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				If Me._Customer.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnCustomerIDChanging(value)
				Me.SendPropertyChanging
				Me._CustomerID = value
				Me.SendPropertyChanged("CustomerID")
				Me.OnCustomerIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_EmployeeID", DbType:="Int")>  _
	Public Property EmployeeID() As System.Nullable(Of Integer)
		Get
			Return Me._EmployeeID
		End Get
		Set
			If (Me._EmployeeID.Equals(value) = false) Then
				If Me._Employee.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnEmployeeIDChanging(value)
				Me.SendPropertyChanging
				Me._EmployeeID = value
				Me.SendPropertyChanged("EmployeeID")
				Me.OnEmployeeIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_OrderDate", DbType:="DateTime")>  _
	Public Property OrderDate() As System.Nullable(Of Date)
		Get
			Return Me._OrderDate
		End Get
		Set
			If (Me._OrderDate.Equals(value) = false) Then
				Me.OnOrderDateChanging(value)
				Me.SendPropertyChanging
				Me._OrderDate = value
				Me.SendPropertyChanged("OrderDate")
				Me.OnOrderDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_RequiredDate", DbType:="DateTime")>  _
	Public Property RequiredDate() As System.Nullable(Of Date)
		Get
			Return Me._RequiredDate
		End Get
		Set
			If (Me._RequiredDate.Equals(value) = false) Then
				Me.OnRequiredDateChanging(value)
				Me.SendPropertyChanging
				Me._RequiredDate = value
				Me.SendPropertyChanged("RequiredDate")
				Me.OnRequiredDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShippedDate", DbType:="DateTime")>  _
	Public Property ShippedDate() As System.Nullable(Of Date)
		Get
			Return Me._ShippedDate
		End Get
		Set
			If (Me._ShippedDate.Equals(value) = false) Then
				Me.OnShippedDateChanging(value)
				Me.SendPropertyChanging
				Me._ShippedDate = value
				Me.SendPropertyChanged("ShippedDate")
				Me.OnShippedDateChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipVia", DbType:="Int")>  _
	Public Property ShipVia() As System.Nullable(Of Integer)
		Get
			Return Me._ShipVia
		End Get
		Set
			If (Me._ShipVia.Equals(value) = false) Then
				If Me._Shipper.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnShipViaChanging(value)
				Me.SendPropertyChanging
				Me._ShipVia = value
				Me.SendPropertyChanged("ShipVia")
				Me.OnShipViaChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Freight", DbType:="Decimal(6,2)")>  _
	Public Property Freight() As System.Nullable(Of Decimal)
		Get
			Return Me._Freight
		End Get
		Set
			If (Me._Freight.Equals(value) = false) Then
				Me.OnFreightChanging(value)
				Me.SendPropertyChanging
				Me._Freight = value
				Me.SendPropertyChanged("Freight")
				Me.OnFreightChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipName", DbType:="NVarChar(40)")>  _
	Public Property ShipName() As String
		Get
			Return Me._ShipName
		End Get
		Set
			If (String.Equals(Me._ShipName, value) = false) Then
				Me.OnShipNameChanging(value)
				Me.SendPropertyChanging
				Me._ShipName = value
				Me.SendPropertyChanged("ShipName")
				Me.OnShipNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipAddress", DbType:="NVarChar(60)")>  _
	Public Property ShipAddress() As String
		Get
			Return Me._ShipAddress
		End Get
		Set
			If (String.Equals(Me._ShipAddress, value) = false) Then
				Me.OnShipAddressChanging(value)
				Me.SendPropertyChanging
				Me._ShipAddress = value
				Me.SendPropertyChanged("ShipAddress")
				Me.OnShipAddressChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipCity", DbType:="NVarChar(15)")>  _
	Public Property ShipCity() As String
		Get
			Return Me._ShipCity
		End Get
		Set
			If (String.Equals(Me._ShipCity, value) = false) Then
				Me.OnShipCityChanging(value)
				Me.SendPropertyChanging
				Me._ShipCity = value
				Me.SendPropertyChanged("ShipCity")
				Me.OnShipCityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipRegion", DbType:="NVarChar(15)")>  _
	Public Property ShipRegion() As String
		Get
			Return Me._ShipRegion
		End Get
		Set
			If (String.Equals(Me._ShipRegion, value) = false) Then
				Me.OnShipRegionChanging(value)
				Me.SendPropertyChanging
				Me._ShipRegion = value
				Me.SendPropertyChanged("ShipRegion")
				Me.OnShipRegionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipPostalCode", DbType:="NVarChar(10)")>  _
	Public Property ShipPostalCode() As String
		Get
			Return Me._ShipPostalCode
		End Get
		Set
			If (String.Equals(Me._ShipPostalCode, value) = false) Then
				Me.OnShipPostalCodeChanging(value)
				Me.SendPropertyChanging
				Me._ShipPostalCode = value
				Me.SendPropertyChanged("ShipPostalCode")
				Me.OnShipPostalCodeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipCountry", DbType:="NVarChar(15)")>  _
	Public Property ShipCountry() As String
		Get
			Return Me._ShipCountry
		End Get
		Set
			If (String.Equals(Me._ShipCountry, value) = false) Then
				Me.OnShipCountryChanging(value)
				Me.SendPropertyChanging
				Me._ShipCountry = value
				Me.SendPropertyChanged("ShipCountry")
				Me.OnShipCountryChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Order_Order_Detail", Storage:="_Order_Details", ThisKey:="OrderID", OtherKey:="OrderID")>  _
	Public Property Order_Details() As EntitySet(Of Order_Detail)
		Get
			Return Me._Order_Details
		End Get
		Set
			Me._Order_Details.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Customer_Order", Storage:="_Customer", ThisKey:="CustomerID", OtherKey:="CustomerID", IsForeignKey:=true, DeleteRule:="CASCADE")>  _
	Public Property Customer() As Customer
		Get
			Return Me._Customer.Entity
		End Get
		Set
			Dim previousValue As Customer = Me._Customer.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Customer.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Customer.Entity = Nothing
					previousValue.Orders.Remove(Me)
				End If
				Me._Customer.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Orders.Add(Me)
					Me._CustomerID = value.CustomerID
				Else
					Me._CustomerID = CType(Nothing, String)
				End If
				Me.SendPropertyChanged("Customer")
			End If
		End Set
	End Property
	
	<Association(Name:="Employee_Order", Storage:="_Employee", ThisKey:="EmployeeID", OtherKey:="EmployeeID", IsForeignKey:=true, DeleteRule:="CASCADE")>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Employee.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Employee.Entity = Nothing
					previousValue.Orders.Remove(Me)
				End If
				Me._Employee.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Orders.Add(Me)
					Me._EmployeeID = value.EmployeeID
				Else
					Me._EmployeeID = CType(Nothing, Nullable(Of Integer))
				End If
				Me.SendPropertyChanged("Employee")
			End If
		End Set
	End Property
	
	<Association(Name:="Shipper_Order", Storage:="_Shipper", ThisKey:="ShipVia", OtherKey:="ShipperID", IsForeignKey:=true, DeleteRule:="CASCADE")>  _
	Public Property Shipper() As Shipper
		Get
			Return Me._Shipper.Entity
		End Get
		Set
			Dim previousValue As Shipper = Me._Shipper.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Shipper.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Shipper.Entity = Nothing
					previousValue.Orders.Remove(Me)
				End If
				Me._Shipper.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Orders.Add(Me)
					Me._ShipVia = value.ShipperID
				Else
					Me._ShipVia = CType(Nothing, Nullable(Of Integer))
				End If
				Me.SendPropertyChanged("Shipper")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.[Order] = Me
	End Sub
	
	Private Sub detach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.[Order] = Nothing
	End Sub
End Class

<Table(Name:="dbo.Products")>  _
Partial Public Class Product
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ProductID As Integer
	
	Private _ProductName As String
	
	Private _SupplierID As System.Nullable(Of Integer)
	
	Private _CategoryID As System.Nullable(Of Integer)
	
	Private _QuantityPerUnit As String
	
	Private _UnitPrice As System.Nullable(Of Decimal)
	
	Private _UnitsInStock As System.Nullable(Of Short)
	
	Private _UnitsOnOrder As System.Nullable(Of Short)
	
	Private _ReorderLevel As System.Nullable(Of Short)
	
	Private _Discontinued As Boolean
	
	Private _Order_Details As EntitySet(Of Order_Detail)
	
	Private _Category As EntityRef(Of Category)
	
	Private _Supplier As EntityRef(Of Supplier)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnProductIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnProductIDChanged()
    End Sub
    Partial Private Sub OnProductNameChanging(value As String)
    End Sub
    Partial Private Sub OnProductNameChanged()
    End Sub
    Partial Private Sub OnSupplierIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSupplierIDChanged()
    End Sub
    Partial Private Sub OnCategoryIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnCategoryIDChanged()
    End Sub
    Partial Private Sub OnQuantityPerUnitChanging(value As String)
    End Sub
    Partial Private Sub OnQuantityPerUnitChanged()
    End Sub
    Partial Private Sub OnUnitPriceChanging(value As System.Nullable(Of Decimal))
    End Sub
    Partial Private Sub OnUnitPriceChanged()
    End Sub
    Partial Private Sub OnUnitsInStockChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnUnitsInStockChanged()
    End Sub
    Partial Private Sub OnUnitsOnOrderChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnUnitsOnOrderChanged()
    End Sub
    Partial Private Sub OnReorderLevelChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnReorderLevelChanged()
    End Sub
    Partial Private Sub OnDiscontinuedChanging(value As Boolean)
    End Sub
    Partial Private Sub OnDiscontinuedChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Order_Details = New EntitySet(Of Order_Detail)(AddressOf Me.attach_Order_Details, AddressOf Me.detach_Order_Details)
		Me._Category = CType(Nothing, EntityRef(Of Category))
		Me._Supplier = CType(Nothing, EntityRef(Of Supplier))
		OnCreated
	End Sub
	
	<Column(Storage:="_ProductID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property ProductID() As Integer
		Get
			Return Me._ProductID
		End Get
		Set
			If ((Me._ProductID = value)  _
						= false) Then
				Me.OnProductIDChanging(value)
				Me.SendPropertyChanging
				Me._ProductID = value
				Me.SendPropertyChanged("ProductID")
				Me.OnProductIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ProductName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property ProductName() As String
		Get
			Return Me._ProductName
		End Get
		Set
			If (String.Equals(Me._ProductName, value) = false) Then
				Me.OnProductNameChanging(value)
				Me.SendPropertyChanging
				Me._ProductName = value
				Me.SendPropertyChanged("ProductName")
				Me.OnProductNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_SupplierID", DbType:="Int")>  _
	Public Property SupplierID() As System.Nullable(Of Integer)
		Get
			Return Me._SupplierID
		End Get
		Set
			If (Me._SupplierID.Equals(value) = false) Then
				If Me._Supplier.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnSupplierIDChanging(value)
				Me.SendPropertyChanging
				Me._SupplierID = value
				Me.SendPropertyChanged("SupplierID")
				Me.OnSupplierIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CategoryID", DbType:="Int")>  _
	Public Property CategoryID() As System.Nullable(Of Integer)
		Get
			Return Me._CategoryID
		End Get
		Set
			If (Me._CategoryID.Equals(value) = false) Then
				If Me._Category.HasLoadedOrAssignedValue Then
					Throw New System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException
				End If
				Me.OnCategoryIDChanging(value)
				Me.SendPropertyChanging
				Me._CategoryID = value
				Me.SendPropertyChanged("CategoryID")
				Me.OnCategoryIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_QuantityPerUnit", DbType:="NVarChar(20)")>  _
	Public Property QuantityPerUnit() As String
		Get
			Return Me._QuantityPerUnit
		End Get
		Set
			If (String.Equals(Me._QuantityPerUnit, value) = false) Then
				Me.OnQuantityPerUnitChanging(value)
				Me.SendPropertyChanging
				Me._QuantityPerUnit = value
				Me.SendPropertyChanged("QuantityPerUnit")
				Me.OnQuantityPerUnitChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UnitPrice", DbType:="Decimal(5,2)")>  _
	Public Property UnitPrice() As System.Nullable(Of Decimal)
		Get
			Return Me._UnitPrice
		End Get
		Set
			If (Me._UnitPrice.Equals(value) = false) Then
				Me.OnUnitPriceChanging(value)
				Me.SendPropertyChanging
				Me._UnitPrice = value
				Me.SendPropertyChanged("UnitPrice")
				Me.OnUnitPriceChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UnitsInStock", DbType:="SmallInt")>  _
	Public Property UnitsInStock() As System.Nullable(Of Short)
		Get
			Return Me._UnitsInStock
		End Get
		Set
			If (Me._UnitsInStock.Equals(value) = false) Then
				Me.OnUnitsInStockChanging(value)
				Me.SendPropertyChanging
				Me._UnitsInStock = value
				Me.SendPropertyChanged("UnitsInStock")
				Me.OnUnitsInStockChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_UnitsOnOrder", DbType:="SmallInt")>  _
	Public Property UnitsOnOrder() As System.Nullable(Of Short)
		Get
			Return Me._UnitsOnOrder
		End Get
		Set
			If (Me._UnitsOnOrder.Equals(value) = false) Then
				Me.OnUnitsOnOrderChanging(value)
				Me.SendPropertyChanging
				Me._UnitsOnOrder = value
				Me.SendPropertyChanged("UnitsOnOrder")
				Me.OnUnitsOnOrderChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ReorderLevel", DbType:="SmallInt")>  _
	Public Property ReorderLevel() As System.Nullable(Of Short)
		Get
			Return Me._ReorderLevel
		End Get
		Set
			If (Me._ReorderLevel.Equals(value) = false) Then
				Me.OnReorderLevelChanging(value)
				Me.SendPropertyChanging
				Me._ReorderLevel = value
				Me.SendPropertyChanged("ReorderLevel")
				Me.OnReorderLevelChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Discontinued", DbType:="Bit NOT NULL")>  _
	Public Property Discontinued() As Boolean
		Get
			Return Me._Discontinued
		End Get
		Set
			If ((Me._Discontinued = value)  _
						= false) Then
				Me.OnDiscontinuedChanging(value)
				Me.SendPropertyChanging
				Me._Discontinued = value
				Me.SendPropertyChanged("Discontinued")
				Me.OnDiscontinuedChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Product_Order_Detail", Storage:="_Order_Details", ThisKey:="ProductID", OtherKey:="ProductID")>  _
	Public Property Order_Details() As EntitySet(Of Order_Detail)
		Get
			Return Me._Order_Details
		End Get
		Set
			Me._Order_Details.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Category_Product", Storage:="_Category", ThisKey:="CategoryID", OtherKey:="CategoryID", IsForeignKey:=true, DeleteRule:="CASCADE")>  _
	Public Property Category() As Category
		Get
			Return Me._Category.Entity
		End Get
		Set
			Dim previousValue As Category = Me._Category.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Category.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Category.Entity = Nothing
					previousValue.Products.Remove(Me)
				End If
				Me._Category.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Products.Add(Me)
					Me._CategoryID = value.CategoryID
				Else
					Me._CategoryID = CType(Nothing, Nullable(Of Integer))
				End If
				Me.SendPropertyChanged("Category")
			End If
		End Set
	End Property
	
	<Association(Name:="Supplier_Product", Storage:="_Supplier", ThisKey:="SupplierID", OtherKey:="SupplierID", IsForeignKey:=true, DeleteRule:="CASCADE")>  _
	Public Property Supplier() As Supplier
		Get
			Return Me._Supplier.Entity
		End Get
		Set
			Dim previousValue As Supplier = Me._Supplier.Entity
			If ((Object.Equals(previousValue, value) = false)  _
						OrElse (Me._Supplier.HasLoadedOrAssignedValue = false)) Then
				Me.SendPropertyChanging
				If ((previousValue Is Nothing)  _
							= false) Then
					Me._Supplier.Entity = Nothing
					previousValue.Products.Remove(Me)
				End If
				Me._Supplier.Entity = value
				If ((value Is Nothing)  _
							= false) Then
					value.Products.Add(Me)
					Me._SupplierID = value.SupplierID
				Else
					Me._SupplierID = CType(Nothing, Nullable(Of Integer))
				End If
				Me.SendPropertyChanged("Supplier")
			End If
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.Product = Me
	End Sub
	
	Private Sub detach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.Product = Nothing
	End Sub
End Class

<Table(Name:="dbo.Region")>  _
Partial Public Class Region
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _RegionID As Integer
	
	Private _RegionDescription As String
	
	Private _Territories As EntitySet(Of Territory)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnRegionIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnRegionIDChanged()
    End Sub
    Partial Private Sub OnRegionDescriptionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionDescriptionChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Territories = New EntitySet(Of Territory)(AddressOf Me.attach_Territories, AddressOf Me.detach_Territories)
		OnCreated
	End Sub
	
	<Column(Storage:="_RegionID", DbType:="Int NOT NULL", IsPrimaryKey:=true)>  _
	Public Property RegionID() As Integer
		Get
			Return Me._RegionID
		End Get
		Set
			If ((Me._RegionID = value)  _
						= false) Then
				Me.OnRegionIDChanging(value)
				Me.SendPropertyChanging
				Me._RegionID = value
				Me.SendPropertyChanged("RegionID")
				Me.OnRegionIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_RegionDescription", DbType:="NChar(50) NOT NULL", CanBeNull:=false)>  _
	Public Property RegionDescription() As String
		Get
			Return Me._RegionDescription
		End Get
		Set
			If (String.Equals(Me._RegionDescription, value) = false) Then
				Me.OnRegionDescriptionChanging(value)
				Me.SendPropertyChanging
				Me._RegionDescription = value
				Me.SendPropertyChanged("RegionDescription")
				Me.OnRegionDescriptionChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Region_Territory", Storage:="_Territories", ThisKey:="RegionID", OtherKey:="RegionID")>  _
	Public Property Territories() As EntitySet(Of Territory)
		Get
			Return Me._Territories
		End Get
		Set
			Me._Territories.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Territories(ByVal entity As Territory)
		Me.SendPropertyChanging
		entity.Region = Me
	End Sub
	
	Private Sub detach_Territories(ByVal entity As Territory)
		Me.SendPropertyChanging
		entity.Region = Nothing
	End Sub
End Class

<Table(Name:="dbo.Shippers")>  _
Partial Public Class Shipper
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ShipperID As Integer
	
	Private _CompanyName As String
	
	Private _Phone As String
	
	Private _Orders As EntitySet(Of [Order])
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnShipperIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnShipperIDChanged()
    End Sub
    Partial Private Sub OnCompanyNameChanging(value As String)
    End Sub
    Partial Private Sub OnCompanyNameChanged()
    End Sub
    Partial Private Sub OnPhoneChanging(value As String)
    End Sub
    Partial Private Sub OnPhoneChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
		OnCreated
	End Sub
	
	<Column(Storage:="_ShipperID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property ShipperID() As Integer
		Get
			Return Me._ShipperID
		End Get
		Set
			If ((Me._ShipperID = value)  _
						= false) Then
				Me.OnShipperIDChanging(value)
				Me.SendPropertyChanging
				Me._ShipperID = value
				Me.SendPropertyChanged("ShipperID")
				Me.OnShipperIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CompanyName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property CompanyName() As String
		Get
			Return Me._CompanyName
		End Get
		Set
			If (String.Equals(Me._CompanyName, value) = false) Then
				Me.OnCompanyNameChanging(value)
				Me.SendPropertyChanging
				Me._CompanyName = value
				Me.SendPropertyChanged("CompanyName")
				Me.OnCompanyNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Phone", DbType:="NVarChar(24)")>  _
	Public Property Phone() As String
		Get
			Return Me._Phone
		End Get
		Set
			If (String.Equals(Me._Phone, value) = false) Then
				Me.OnPhoneChanging(value)
				Me.SendPropertyChanging
				Me._Phone = value
				Me.SendPropertyChanged("Phone")
				Me.OnPhoneChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Shipper_Order", Storage:="_Orders", ThisKey:="ShipperID", OtherKey:="ShipVia")>  _
	Public Property Orders() As EntitySet(Of [Order])
		Get
			Return Me._Orders
		End Get
		Set
			Me._Orders.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Shipper = Me
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Shipper = Nothing
	End Sub
End Class

<Table(Name:="dbo.Suppliers")>  _
Partial Public Class Supplier
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _SupplierID As Integer
	
	Private _CompanyName As String
	
	Private _ContactName As String
	
	Private _ContactTitle As String
	
	Private _Address As String
	
	Private _City As String
	
	Private _Region As String
	
	Private _PostalCode As String
	
	Private _Country As String
	
	Private _Phone As String
	
	Private _Fax As String
	
	Private _HomePage As String
	
	Private _Products As EntitySet(Of Product)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnSupplierIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnSupplierIDChanged()
    End Sub
    Partial Private Sub OnCompanyNameChanging(value As String)
    End Sub
    Partial Private Sub OnCompanyNameChanged()
    End Sub
    Partial Private Sub OnContactNameChanging(value As String)
    End Sub
    Partial Private Sub OnContactNameChanged()
    End Sub
    Partial Private Sub OnContactTitleChanging(value As String)
    End Sub
    Partial Private Sub OnContactTitleChanged()
    End Sub
    Partial Private Sub OnAddressChanging(value As String)
    End Sub
    Partial Private Sub OnAddressChanged()
    End Sub
    Partial Private Sub OnCityChanging(value As String)
    End Sub
    Partial Private Sub OnCityChanged()
    End Sub
    Partial Private Sub OnRegionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionChanged()
    End Sub
    Partial Private Sub OnPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnPostalCodeChanged()
    End Sub
    Partial Private Sub OnCountryChanging(value As String)
    End Sub
    Partial Private Sub OnCountryChanged()
    End Sub
    Partial Private Sub OnPhoneChanging(value As String)
    End Sub
    Partial Private Sub OnPhoneChanged()
    End Sub
    Partial Private Sub OnFaxChanging(value As String)
    End Sub
    Partial Private Sub OnFaxChanged()
    End Sub
    Partial Private Sub OnHomePageChanging(value As String)
    End Sub
    Partial Private Sub OnHomePageChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		Me._Products = New EntitySet(Of Product)(AddressOf Me.attach_Products, AddressOf Me.detach_Products)
		OnCreated
	End Sub
	
	<Column(Storage:="_SupplierID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property SupplierID() As Integer
		Get
			Return Me._SupplierID
		End Get
		Set
			If ((Me._SupplierID = value)  _
						= false) Then
				Me.OnSupplierIDChanging(value)
				Me.SendPropertyChanging
				Me._SupplierID = value
				Me.SendPropertyChanged("SupplierID")
				Me.OnSupplierIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_CompanyName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property CompanyName() As String
		Get
			Return Me._CompanyName
		End Get
		Set
			If (String.Equals(Me._CompanyName, value) = false) Then
				Me.OnCompanyNameChanging(value)
				Me.SendPropertyChanging
				Me._CompanyName = value
				Me.SendPropertyChanged("CompanyName")
				Me.OnCompanyNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ContactName", DbType:="NVarChar(30)")>  _
	Public Property ContactName() As String
		Get
			Return Me._ContactName
		End Get
		Set
			If (String.Equals(Me._ContactName, value) = false) Then
				Me.OnContactNameChanging(value)
				Me.SendPropertyChanging
				Me._ContactName = value
				Me.SendPropertyChanged("ContactName")
				Me.OnContactNameChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ContactTitle", DbType:="NVarChar(30)")>  _
	Public Property ContactTitle() As String
		Get
			Return Me._ContactTitle
		End Get
		Set
			If (String.Equals(Me._ContactTitle, value) = false) Then
				Me.OnContactTitleChanging(value)
				Me.SendPropertyChanging
				Me._ContactTitle = value
				Me.SendPropertyChanged("ContactTitle")
				Me.OnContactTitleChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Address", DbType:="NVarChar(60)")>  _
	Public Property Address() As String
		Get
			Return Me._Address
		End Get
		Set
			If (String.Equals(Me._Address, value) = false) Then
				Me.OnAddressChanging(value)
				Me.SendPropertyChanging
				Me._Address = value
				Me.SendPropertyChanged("Address")
				Me.OnAddressChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_City", DbType:="NVarChar(15)")>  _
	Public Property City() As String
		Get
			Return Me._City
		End Get
		Set
			If (String.Equals(Me._City, value) = false) Then
				Me.OnCityChanging(value)
				Me.SendPropertyChanging
				Me._City = value
				Me.SendPropertyChanged("City")
				Me.OnCityChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Region", DbType:="NVarChar(15)")>  _
	Public Property Region() As String
		Get
			Return Me._Region
		End Get
		Set
			If (String.Equals(Me._Region, value) = false) Then
				Me.OnRegionChanging(value)
				Me.SendPropertyChanging
				Me._Region = value
				Me.SendPropertyChanged("Region")
				Me.OnRegionChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_PostalCode", DbType:="NVarChar(10)")>  _
	Public Property PostalCode() As String
		Get
			Return Me._PostalCode
		End Get
		Set
			If (String.Equals(Me._PostalCode, value) = false) Then
				Me.OnPostalCodeChanging(value)
				Me.SendPropertyChanging
				Me._PostalCode = value
				Me.SendPropertyChanged("PostalCode")
				Me.OnPostalCodeChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Country", DbType:="NVarChar(15)")>  _
	Public Property Country() As String
		Get
			Return Me._Country
		End Get
		Set
			If (String.Equals(Me._Country, value) = false) Then
				Me.OnCountryChanging(value)
				Me.SendPropertyChanging
				Me._Country = value
				Me.SendPropertyChanged("Country")
				Me.OnCountryChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Phone", DbType:="NVarChar(24)")>  _
	Public Property Phone() As String
		Get
			Return Me._Phone
		End Get
		Set
			If (String.Equals(Me._Phone, value) = false) Then
				Me.OnPhoneChanging(value)
				Me.SendPropertyChanging
				Me._Phone = value
				Me.SendPropertyChanged("Phone")
				Me.OnPhoneChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_Fax", DbType:="NVarChar(24)")>  _
	Public Property Fax() As String
		Get
			Return Me._Fax
		End Get
		Set
			If (String.Equals(Me._Fax, value) = false) Then
				Me.OnFaxChanging(value)
				Me.SendPropertyChanging
				Me._Fax = value
				Me.SendPropertyChanged("Fax")
				Me.OnFaxChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_HomePage", DbType:="NText", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property HomePage() As String
		Get
			Return Me._HomePage
		End Get
		Set
			If (String.Equals(Me._HomePage, value) = false) Then
				Me.OnHomePageChanging(value)
				Me.SendPropertyChanging
				Me._HomePage = value
				Me.SendPropertyChanged("HomePage")
				Me.OnHomePageChanged
			End If
		End Set
	End Property
	
	<Association(Name:="Supplier_Product", Storage:="_Products", ThisKey:="SupplierID", OtherKey:="SupplierID")>  _
	Public Property Products() As EntitySet(Of Product)
		Get
			Return Me._Products
		End Get
		Set
			Me._Products.Assign(value)
		End Set
	End Property
	
	Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
	
	Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
	
	Protected Overridable Sub SendPropertyChanging()
		If ((Me.PropertyChangingEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
		End If
	End Sub
	
	Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
		If ((Me.PropertyChangedEvent Is Nothing)  _
					= false) Then
			RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
		End If
	End Sub
	
	Private Sub attach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Supplier = Me
	End Sub
	
	Private Sub detach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Supplier = Nothing
	End Sub
End Class
