LINQ - Sample Queries

This project contains about 101 samples using LINQ.

 
 
 
 
 
4.8 Star
(89)
175,658 times
Add to favorites
3/13/2012
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

VB.NET
C#
' Copyright © Microsoft Corporation.  All Rights Reserved.
' This code released under the terms of the 
' Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)
'
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.1412
'
'     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 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 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 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 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 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 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 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 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 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 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
  Partial Private Sub InsertContact(instance As Contact)
    End Sub
  Partial Private Sub UpdateContact(instance As Contact)
    End Sub
  Partial Private Sub DeleteContact(instance As Contact)
    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
  #End Region
	
	Shared Sub New()
	End Sub
	
	Public Sub New()
		MyBase.New(Global.SampleQueries.My.MySettings.Default.NORTHWINDConnectionString1, 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 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 CustomerCustomerDemos() As System.Data.Linq.Table(Of CustomerCustomerDemo)
		Get
			Return Me.GetTable(Of CustomerCustomerDemo)
		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 Regions() As System.Data.Linq.Table(Of Region)
		Get
			Return Me.GetTable(Of Region)
		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 EmployeeTerritories() As System.Data.Linq.Table(Of EmployeeTerritory)
		Get
			Return Me.GetTable(Of EmployeeTerritory)
		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 Categories() As System.Data.Linq.Table(Of Category)
		Get
			Return Me.GetTable(Of Category)
		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 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
	
	Public ReadOnly Property Contacts() As System.Data.Linq.Table(Of Contact)
		Get
			Return Me.GetTable(Of Contact)
		End Get
	End Property
	
	Public ReadOnly Property Quarterly_Orders() As System.Data.Linq.Table(Of Quarterly_Order)
		Get
			Return Me.GetTable(Of Quarterly_Order)
		End Get
	End Property
	
	Public ReadOnly Property Invoices() As System.Data.Linq.Table(Of Invoice)
		Get
			Return Me.GetTable(Of Invoice)
		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
	
	<FunctionAttribute(Name:="dbo.[Customers By City]")>  _
	Public Function Customers_By_City(<Parameter(Name:="@param1", DbType:="nvarchar")> ByVal param1 As String) As ISingleResult(Of Customers_By_City)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), param1)
		Return CType(result.ReturnValue,ISingleResult(Of Customers_By_City))
	End Function
	
	<FunctionAttribute(Name:="dbo.ProductsUnderThisUnitPrice", IsComposable:=true)>  _
	Public Function ProductsUnderThisUnitPrice(<Parameter(Name:="@price", DbType:="money")> ByVal price As System.Nullable(Of Decimal)) As IQueryable(Of ProductsUnderThisUnitPrice)
		Return Me.CreateMethodCallQuery(Of ProductsUnderThisUnitPrice)(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), price)
	End Function
	
	<FunctionAttribute(Name:="dbo.MinUnitPriceByCategory", IsComposable:=true)>  _
	Public Function MinUnitPriceByCategory(<Parameter(DbType:="Int")> ByVal categoryID As System.Nullable(Of Integer)) As System.Nullable(Of Decimal)
		Return CType(Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), categoryID).ReturnValue,System.Nullable(Of Decimal))
	End Function
	
	<FunctionAttribute(Name:="dbo.TotalProductUnitPriceByCategory", IsComposable:=true)>  _
	Public Function TotalProductUnitPriceByCategory(<Parameter(DbType:="Int")> ByVal categoryID As System.Nullable(Of Integer)) As System.Nullable(Of Decimal)
		Return CType(Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), categoryID).ReturnValue,System.Nullable(Of Decimal))
	End Function
	
	<FunctionAttribute(Name:="dbo.[Whole Or Partial Customers Set]")>  _
	Public Function Whole_Or_Partial_Customers_Set(<Parameter(DbType:="Int")> ByVal param1 As System.Nullable(Of Integer)) As ISingleResult(Of Whole_Or_Partial_Customers_SetResult)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), param1)
		Return CType(result.ReturnValue,ISingleResult(Of Whole_Or_Partial_Customers_SetResult))
	End Function
	
	<FunctionAttribute(Name:="dbo.[Customers Count By Region]")>  _
	Public Function Customers_Count_By_Region(<Parameter(DbType:="NVarChar(15)")> ByVal param1 As String) As Integer
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), param1)
		Return CType(result.ReturnValue,Integer)
	End Function
	
	<FunctionAttribute(Name:="dbo.[Get Customer And Orders]")>  _
	Public Function Get_Customer_And_Orders(<Parameter(Name:="CustomerID", DbType:="NChar(5)")> ByVal customerID As String) As ISingleResult(Of Get_Customer_And_OrdersResult)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), customerID)
		Return CType(result.ReturnValue,ISingleResult(Of Get_Customer_And_OrdersResult))
	End Function
	
	<FunctionAttribute(Name:="dbo.[Get Customer And Orders]")>  _
	Public Function Get_Customer_And_Orders1(<Parameter(Name:="CustomerID", DbType:="NChar(5)")> ByVal customerID As String) As ISingleResult(Of Get_Customer_And_OrdersResult1)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), customerID)
		Return CType(result.ReturnValue,ISingleResult(Of Get_Customer_And_OrdersResult1))
	End Function
	
	<FunctionAttribute(Name:="dbo.CustOrderHist")>  _
	Public Function CustOrderHist(<Parameter(Name:="CustomerID", DbType:="NChar(5)")> ByVal customerID As String) As ISingleResult(Of CustOrderHistResult)
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), customerID)
		Return CType(result.ReturnValue,ISingleResult(Of CustOrderHistResult))
	End Function
	
	<FunctionAttribute(Name:="dbo.CustOrderTotal")>  _
	Public Function CustOrderTotal(<Parameter(Name:="CustomerID", DbType:="NChar(5)")> ByVal customerID As String, <Parameter(Name:="TotalSales", DbType:="Money")> ByRef totalSales As System.Nullable(Of Decimal)) As Integer
		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), customerID, totalSales)
		totalSales = CType(result.GetParameterValue(1),System.Nullable(Of Decimal))
		Return CType(result.ReturnValue,Integer)
	End Function
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 _Employee As EntityRef(Of Employee)
	
	Private _Customer As EntityRef(Of Customer)
	
	Private _Shipper As EntityRef(Of Shipper)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    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
		OnCreated
		Me._Order_Details = New EntitySet(Of Order_Detail)(AddressOf Me.attach_Order_Details, AddressOf Me.detach_Order_Details)
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
		Me._Customer = CType(Nothing, EntityRef(Of Customer))
		Me._Shipper = CType(Nothing, EntityRef(Of Shipper))
	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:="Money")>  _
	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", 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:="Employee_Order", Storage:="_Employee", ThisKey:="EmployeeID", IsForeignKey:=true)>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If (((previousValue Is 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:="Customer_Order", Storage:="_Customer", ThisKey:="CustomerID", IsForeignKey:=true)>  _
	Public Property Customer() As Customer
		Get
			Return Me._Customer.Entity
		End Get
		Set
			Dim previousValue As Customer = Me._Customer.Entity
			If (((previousValue Is 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:="Shipper_Order", Storage:="_Shipper", ThisKey:="ShipVia", IsForeignKey:=true)>  _
	Public Property Shipper() As Shipper
		Get
			Return Me._Shipper.Entity
		End Get
		Set
			Dim previousValue As Shipper = Me._Shipper.Entity
			If (((previousValue Is 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
		Me.SendPropertyChanged("Order_Details")
	End Sub
	
	Private Sub detach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.[Order] = Nothing
		Me.SendPropertyChanged("Order_Details")
	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()
    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
		OnCreated
		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))
	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:="Money")>  _
	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", 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", IsForeignKey:=true)>  _
	Public Property Category() As Category
		Get
			Return Me._Category.Entity
		End Get
		Set
			Dim previousValue As Category = Me._Category.Entity
			If (((previousValue Is 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", IsForeignKey:=true)>  _
	Public Property Supplier() As Supplier
		Get
			Return Me._Supplier.Entity
		End Get
		Set
			Dim previousValue As Supplier = Me._Supplier.Entity
			If (((previousValue Is 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
		Me.SendPropertyChanged("Order_Details")
	End Sub
	
	Private Sub detach_Order_Details(ByVal entity As Order_Detail)
		Me.SendPropertyChanging
		entity.Product = Nothing
		Me.SendPropertyChanged("Order_Details")
	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()
    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
		OnCreated
		Me._CustomerDemographic = CType(Nothing, EntityRef(Of CustomerDemographic))
		Me._Customer = CType(Nothing, EntityRef(Of Customer))
	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", IsForeignKey:=true)>  _
	Public Property CustomerDemographic() As CustomerDemographic
		Get
			Return Me._CustomerDemographic.Entity
		End Get
		Set
			Dim previousValue As CustomerDemographic = Me._CustomerDemographic.Entity
			If (((previousValue Is 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", IsForeignKey:=true)>  _
	Public Property Customer() As Customer
		Get
			Return Me._Customer.Entity
		End Get
		Set
			Dim previousValue As Customer = Me._Customer.Entity
			If (((previousValue Is 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.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()
    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
		OnCreated
		Me._CustomerCustomerDemos = New EntitySet(Of CustomerCustomerDemo)(AddressOf Me.attach_CustomerCustomerDemos, AddressOf Me.detach_CustomerCustomerDemos)
	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", 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
		Me.SendPropertyChanged("CustomerCustomerDemos")
	End Sub
	
	Private Sub detach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.CustomerDemographic = Nothing
		Me.SendPropertyChanged("CustomerCustomerDemos")
	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()
    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
		OnCreated
		Me._Territories = New EntitySet(Of Territory)(AddressOf Me.attach_Territories, AddressOf Me.detach_Territories)
	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", 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
		Me.SendPropertyChanged("Territories")
	End Sub
	
	Private Sub detach_Territories(ByVal entity As Territory)
		Me.SendPropertyChanging
		entity.Region = Nothing
		Me.SendPropertyChanged("Territories")
	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()
    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
		OnCreated
		Me._EmployeeTerritories = New EntitySet(Of EmployeeTerritory)(AddressOf Me.attach_EmployeeTerritories, AddressOf Me.detach_EmployeeTerritories)
		Me._Region = CType(Nothing, EntityRef(Of Region))
	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:="NChar(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", 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", IsForeignKey:=true)>  _
	Public Property Region() As Region
		Get
			Return Me._Region.Entity
		End Get
		Set
			Dim previousValue As Region = Me._Region.Entity
			If (((previousValue Is 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
		Me.SendPropertyChanged("EmployeeTerritories")
	End Sub
	
	Private Sub detach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Territory = Nothing
		Me.SendPropertyChanged("EmployeeTerritories")
	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 _Territory As EntityRef(Of Territory)
	
	Private _Employee As EntityRef(Of Employee)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    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
		OnCreated
		Me._Territory = CType(Nothing, EntityRef(Of Territory))
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
	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:="Territory_EmployeeTerritory", Storage:="_Territory", ThisKey:="TerritoryID", IsForeignKey:=true)>  _
	Public Property Territory() As Territory
		Get
			Return Me._Territory.Entity
		End Get
		Set
			Dim previousValue As Territory = Me._Territory.Entity
			If (((previousValue Is 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
	
	<Association(Name:="Employee_EmployeeTerritory", Storage:="_Employee", ThisKey:="EmployeeID", IsForeignKey:=true)>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If (((previousValue Is 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
	
	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.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 Byte
	
	Private _Notes As String
	
	Private _ReportsTo As System.Nullable(Of Integer)
	
	Private _PhotoPath As String
	
	Private _Orders As EntitySet(Of [Order])
	
	Private _EmployeeTerritories As EntitySet(Of EmployeeTerritory)
	
	Private _Employees As EntitySet(Of Employee)
	
	Private _Employee As EntityRef(Of Employee)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    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 Byte())
    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
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
		Me._EmployeeTerritories = New EntitySet(Of EmployeeTerritory)(AddressOf Me.attach_EmployeeTerritories, AddressOf Me.detach_EmployeeTerritories)
		Me._Employees = New EntitySet(Of Employee)(AddressOf Me.attach_Employees, AddressOf Me.detach_Employees)
		Me._Employee = CType(Nothing, EntityRef(Of Employee))
	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 Byte()
		Get
			Return Me._Photo
		End Get
		Set
			If ((Me._Photo Is 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_Order", Storage:="_Orders", 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_EmployeeTerritory", Storage:="_EmployeeTerritories", 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_Employee", Storage:="_Employees", 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_Employee", Storage:="_Employee", ThisKey:="ReportsTo", IsForeignKey:=true)>  _
	Public Property Employee() As Employee
		Get
			Return Me._Employee.Entity
		End Get
		Set
			Dim previousValue As Employee = Me._Employee.Entity
			If (((previousValue Is 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_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Employee = Me
		Me.SendPropertyChanged("Orders")
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Employee = Nothing
		Me.SendPropertyChanged("Orders")
	End Sub
	
	Private Sub attach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Employee = Me
		Me.SendPropertyChanged("EmployeeTerritories")
	End Sub
	
	Private Sub detach_EmployeeTerritories(ByVal entity As EmployeeTerritory)
		Me.SendPropertyChanging
		entity.Employee = Nothing
		Me.SendPropertyChanged("EmployeeTerritories")
	End Sub
	
	Private Sub attach_Employees(ByVal entity As Employee)
		Me.SendPropertyChanging
		entity.Employee = Me
		Me.SendPropertyChanged("Employees")
	End Sub
	
	Private Sub detach_Employees(ByVal entity As Employee)
		Me.SendPropertyChanging
		entity.Employee = Nothing
		Me.SendPropertyChanged("Employees")
	End Sub
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 Byte
	
	Private _Products As EntitySet(Of Product)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    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 Byte())
    End Sub
    Partial Private Sub OnPictureChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
		Me._Products = New EntitySet(Of Product)(AddressOf Me.attach_Products, AddressOf Me.detach_Products)
	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 Byte()
		Get
			Return Me._Picture
		End Get
		Set
			If ((Me._Picture Is 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", 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
		Me.SendPropertyChanged("Products")
	End Sub
	
	Private Sub detach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Category = Nothing
		Me.SendPropertyChanged("Products")
	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 _Orders As EntitySet(Of [Order])
	
	Private _CustomerCustomerDemos As EntitySet(Of CustomerCustomerDemo)
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    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
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
		Me._CustomerCustomerDemos = New EntitySet(Of CustomerCustomerDemo)(AddressOf Me.attach_CustomerCustomerDemos, AddressOf Me.detach_CustomerCustomerDemos)
	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
	
	<Association(Name:="Customer_Order", Storage:="_Orders", OtherKey:="CustomerID")>  _
	Public Property Orders() As EntitySet(Of [Order])
		Get
			Return Me._Orders
		End Get
		Set
			Me._Orders.Assign(value)
		End Set
	End Property
	
	<Association(Name:="Customer_CustomerCustomerDemo", Storage:="_CustomerCustomerDemos", OtherKey:="CustomerID")>  _
	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_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Customer = Me
		Me.SendPropertyChanged("Orders")
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Customer = Nothing
		Me.SendPropertyChanged("Orders")
	End Sub
	
	Private Sub attach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.Customer = Me
		Me.SendPropertyChanged("CustomerCustomerDemos")
	End Sub
	
	Private Sub detach_CustomerCustomerDemos(ByVal entity As CustomerCustomerDemo)
		Me.SendPropertyChanging
		entity.Customer = Nothing
		Me.SendPropertyChanged("CustomerCustomerDemos")
	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()
    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
		OnCreated
		Me._Orders = New EntitySet(Of [Order])(AddressOf Me.attach_Orders, AddressOf Me.detach_Orders)
	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", 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
		Me.SendPropertyChanged("Orders")
	End Sub
	
	Private Sub detach_Orders(ByVal entity As [Order])
		Me.SendPropertyChanging
		entity.Shipper = Nothing
		Me.SendPropertyChanged("Orders")
	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()
    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
		OnCreated
		Me._Products = New EntitySet(Of Product)(AddressOf Me.attach_Products, AddressOf Me.detach_Products)
	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", 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
		Me.SendPropertyChanged("Products")
	End Sub
	
	Private Sub detach_Products(ByVal entity As Product)
		Me.SendPropertyChanging
		entity.Supplier = Nothing
		Me.SendPropertyChanged("Products")
	End Sub
End Class

<Table(Name:="dbo.Contacts")>  _
Partial Public Class Contact
	Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
	
	Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
	
	Private _ContactID As Integer
	
	Private _ContactType 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 _Extension As String
	
	Private _Fax As String
	
	Private _HomePage As String
	
	Private _PhotoPath As String
	
	Private _Photo() As Byte
	
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate()
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnContactIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnContactIDChanged()
    End Sub
    Partial Private Sub OnContactTypeChanging(value As String)
    End Sub
    Partial Private Sub OnContactTypeChanged()
    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 OnExtensionChanging(value As String)
    End Sub
    Partial Private Sub OnExtensionChanged()
    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
    Partial Private Sub OnPhotoPathChanging(value As String)
    End Sub
    Partial Private Sub OnPhotoPathChanged()
    End Sub
    Partial Private Sub OnPhotoChanging(value As Byte())
    End Sub
    Partial Private Sub OnPhotoChanged()
    End Sub
    #End Region
	
	Public Sub New()
		MyBase.New
		OnCreated
	End Sub
	
	<Column(Storage:="_ContactID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)>  _
	Public Property ContactID() As Integer
		Get
			Return Me._ContactID
		End Get
		Set
			If ((Me._ContactID = value)  _
						= false) Then
				Me.OnContactIDChanging(value)
				Me.SendPropertyChanging
				Me._ContactID = value
				Me.SendPropertyChanged("ContactID")
				Me.OnContactIDChanged
			End If
		End Set
	End Property
	
	<Column(Storage:="_ContactType", DbType:="NVarChar(50)")>  _
	Public Property ContactType() As String
		Get
			Return Me._ContactType
		End Get
		Set
			If (String.Equals(Me._ContactType, value) = false) Then
				Me.OnContactTypeChanging(value)
				Me.SendPropertyChanging
				Me._ContactType = value
				Me.SendPropertyChanged("ContactType")
				Me.OnContactTypeChanged
			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:="_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:="_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
	
	<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
	
	<Column(Storage:="_Photo", DbType:="Image", UpdateCheck:=UpdateCheck.Never)>  _
	Public Property Photo() As Byte()
		Get
			Return Me._Photo
		End Get
		Set
			If ((Me._Photo Is value)  _
						= false) Then
				Me.OnPhotoChanging(value)
				Me.SendPropertyChanging
				Me._Photo = value
				Me.SendPropertyChanged("Photo")
				Me.OnPhotoChanged
			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.[Quarterly Orders]")>  _
Partial Public Class Quarterly_Order
	
	Private _CustomerID As String
	
	Private _CompanyName As String
	
	Private _City As String
	
	Private _Country As String
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<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
				Me._CustomerID = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_CompanyName", DbType:="NVarChar(40)")>  _
	Public Property CompanyName() As String
		Get
			Return Me._CompanyName
		End Get
		Set
			If (String.Equals(Me._CompanyName, value) = false) Then
				Me._CompanyName = value
			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._City = value
			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._Country = value
			End If
		End Set
	End Property
End Class

<Table(Name:="dbo.Invoices")>  _
Partial Public Class Invoice
	
	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 _CustomerID As String
	
	Private _CustomerName As String
	
	Private _Address As String
	
	Private _City As String
	
	Private _Region As String
	
	Private _PostalCode As String
	
	Private _Country As String
	
	Private _Salesperson As String
	
	Private _OrderID As Integer
	
	Private _OrderDate As System.Nullable(Of Date)
	
	Private _RequiredDate As System.Nullable(Of Date)
	
	Private _ShippedDate As System.Nullable(Of Date)
	
	Private _ShipperName As String
	
	Private _ProductID As Integer
	
	Private _ProductName As String
	
	Private _UnitPrice As Decimal
	
	Private _Quantity As Short
	
	Private _Discount As Single
	
	Private _ExtendedPrice As System.Nullable(Of Decimal)
	
	Private _Freight As System.Nullable(Of Decimal)
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<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._ShipName = value
			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._ShipAddress = value
			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._ShipCity = value
			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._ShipRegion = value
			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._ShipPostalCode = value
			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._ShipCountry = value
			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
				Me._CustomerID = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_CustomerName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property CustomerName() As String
		Get
			Return Me._CustomerName
		End Get
		Set
			If (String.Equals(Me._CustomerName, value) = false) Then
				Me._CustomerName = value
			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._Address = value
			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._City = value
			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._Region = value
			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._PostalCode = value
			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._Country = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_Salesperson", DbType:="NVarChar(31) NOT NULL", CanBeNull:=false)>  _
	Public Property Salesperson() As String
		Get
			Return Me._Salesperson
		End Get
		Set
			If (String.Equals(Me._Salesperson, value) = false) Then
				Me._Salesperson = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_OrderID", DbType:="Int NOT NULL")>  _
	Public Property OrderID() As Integer
		Get
			Return Me._OrderID
		End Get
		Set
			If ((Me._OrderID = value)  _
						= false) Then
				Me._OrderID = value
			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._OrderDate = value
			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._RequiredDate = value
			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._ShippedDate = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_ShipperName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false)>  _
	Public Property ShipperName() As String
		Get
			Return Me._ShipperName
		End Get
		Set
			If (String.Equals(Me._ShipperName, value) = false) Then
				Me._ShipperName = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_ProductID", DbType:="Int NOT NULL")>  _
	Public Property ProductID() As Integer
		Get
			Return Me._ProductID
		End Get
		Set
			If ((Me._ProductID = value)  _
						= false) Then
				Me._ProductID = value
			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._ProductName = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_UnitPrice", DbType:="Money NOT NULL")>  _
	Public Property UnitPrice() As Decimal
		Get
			Return Me._UnitPrice
		End Get
		Set
			If ((Me._UnitPrice = value)  _
						= false) Then
				Me._UnitPrice = value
			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._Quantity = value
			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._Discount = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_ExtendedPrice", DbType:="Money")>  _
	Public Property ExtendedPrice() As System.Nullable(Of Decimal)
		Get
			Return Me._ExtendedPrice
		End Get
		Set
			If (Me._ExtendedPrice.Equals(value) = false) Then
				Me._ExtendedPrice = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_Freight", DbType:="Money")>  _
	Public Property Freight() As System.Nullable(Of Decimal)
		Get
			Return Me._Freight
		End Get
		Set
			If (Me._Freight.Equals(value) = false) Then
				Me._Freight = value
			End If
		End Set
	End Property
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()
    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
		OnCreated
		Me._Order = CType(Nothing, EntityRef(Of [Order]))
		Me._Product = CType(Nothing, EntityRef(Of Product))
	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:="Money 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", IsForeignKey:=true)>  _
	Public Property [Order]() As [Order]
		Get
			Return Me._Order.Entity
		End Get
		Set
			Dim previousValue As [Order] = Me._Order.Entity
			If (((previousValue Is 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", IsForeignKey:=true)>  _
	Public Property Product() As Product
		Get
			Return Me._Product.Entity
		End Get
		Set
			Dim previousValue As Product = Me._Product.Entity
			If (((previousValue Is 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

Partial Public Class Customers_By_City
	
	Private _CustomerID As String = CType(Nothing, String)
	
	Private _ContactName As String = CType(Nothing, String)
	
	Private _CompanyName As String = CType(Nothing, String)
	
	Private _City As String = CType(Nothing, String)
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false, UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
	End Property
	
	<Column(Storage:="_ContactName", DbType:="NVarChar(30)", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property ContactName() As String
		Get
			Return Me._ContactName
		End Get
	End Property
	
	<Column(Storage:="_CompanyName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false, UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property CompanyName() As String
		Get
			Return Me._CompanyName
		End Get
	End Property
	
	<Column(Storage:="_City", DbType:="NVarChar(15)", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property City() As String
		Get
			Return Me._City
		End Get
	End Property
End Class

Partial Public Class ProductsUnderThisUnitPrice
	
	Private _ProductID As Integer = CType(Nothing, Integer)
	
	Private _ProductName As String = CType(Nothing, String)
	
	Private _SupplierID As System.Nullable(Of Integer) = CType(Nothing, System.Nullable(Of Integer))
	
	Private _CategoryID As System.Nullable(Of Integer) = CType(Nothing, System.Nullable(Of Integer))
	
	Private _QuantityPerUnit As String = CType(Nothing, String)
	
	Private _UnitPrice As System.Nullable(Of Decimal) = CType(Nothing, System.Nullable(Of Decimal))
	
	Private _UnitsInStock As System.Nullable(Of Short) = CType(Nothing, System.Nullable(Of Short))
	
	Private _UnitsOnOrder As System.Nullable(Of Short) = CType(Nothing, System.Nullable(Of Short))
	
	Private _ReorderLevel As System.Nullable(Of Short) = CType(Nothing, System.Nullable(Of Short))
	
	Private _Discontinued As Boolean = CType(Nothing, Boolean)
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Column(Storage:="_ProductID", DbType:="Int NOT NULL", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property ProductID() As Integer
		Get
			Return Me._ProductID
		End Get
	End Property
	
	<Column(Storage:="_ProductName", DbType:="NVarChar(40) NOT NULL", CanBeNull:=false, UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property ProductName() As String
		Get
			Return Me._ProductName
		End Get
	End Property
	
	<Column(Storage:="_SupplierID", DbType:="Int", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property SupplierID() As System.Nullable(Of Integer)
		Get
			Return Me._SupplierID
		End Get
	End Property
	
	<Column(Storage:="_CategoryID", DbType:="Int", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property CategoryID() As System.Nullable(Of Integer)
		Get
			Return Me._CategoryID
		End Get
	End Property
	
	<Column(Storage:="_QuantityPerUnit", DbType:="NVarChar(20)", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property QuantityPerUnit() As String
		Get
			Return Me._QuantityPerUnit
		End Get
	End Property
	
	<Column(Storage:="_UnitPrice", DbType:="Money", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property UnitPrice() As System.Nullable(Of Decimal)
		Get
			Return Me._UnitPrice
		End Get
	End Property
	
	<Column(Storage:="_UnitsInStock", DbType:="SmallInt", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property UnitsInStock() As System.Nullable(Of Short)
		Get
			Return Me._UnitsInStock
		End Get
	End Property
	
	<Column(Storage:="_UnitsOnOrder", DbType:="SmallInt", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property UnitsOnOrder() As System.Nullable(Of Short)
		Get
			Return Me._UnitsOnOrder
		End Get
	End Property
	
	<Column(Storage:="_ReorderLevel", DbType:="SmallInt", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property ReorderLevel() As System.Nullable(Of Short)
		Get
			Return Me._ReorderLevel
		End Get
	End Property
	
	<Column(Storage:="_Discontinued", DbType:="Bit NOT NULL", UpdateCheck:=UpdateCheck.Never)>  _
	Public ReadOnly Property Discontinued() As Boolean
		Get
			Return Me._Discontinued
		End Get
	End Property
End Class

Partial Public Class Whole_Or_Partial_Customers_SetResult
	
	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
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false)>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				Me._CustomerID = value
			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._CompanyName = value
			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._ContactName = value
			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._ContactTitle = value
			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._Address = value
			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._City = value
			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._Region = value
			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._PostalCode = value
			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._Country = value
			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._Phone = value
			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._Fax = value
			End If
		End Set
	End Property
End Class

Partial Public Class Get_Customer_And_OrdersResult
	
	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
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false)>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				Me._CustomerID = value
			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._CompanyName = value
			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._ContactName = value
			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._ContactTitle = value
			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._Address = value
			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._City = value
			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._Region = value
			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._PostalCode = value
			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._Country = value
			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._Phone = value
			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._Fax = value
			End If
		End Set
	End Property
End Class

Partial Public Class Get_Customer_And_OrdersResult1
	
	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
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Column(Storage:="_CustomerID", DbType:="NChar(5) NOT NULL", CanBeNull:=false)>  _
	Public Property CustomerID() As String
		Get
			Return Me._CustomerID
		End Get
		Set
			If (String.Equals(Me._CustomerID, value) = false) Then
				Me._CustomerID = value
			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._CompanyName = value
			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._ContactName = value
			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._ContactTitle = value
			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._Address = value
			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._City = value
			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._Region = value
			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._PostalCode = value
			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._Country = value
			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._Phone = value
			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._Fax = value
			End If
		End Set
	End Property
End Class

Partial Public Class CustOrderHistResult
	
	Private _ProductName As String
	
	Private _Total As System.Nullable(Of Integer)
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<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._ProductName = value
			End If
		End Set
	End Property
	
	<Column(Storage:="_Total", DbType:="Int")>  _
	Public Property Total() As System.Nullable(Of Integer)
		Get
			Return Me._Total
		End Get
		Set
			If (Me._Total.Equals(value) = false) Then
				Me._Total = value
			End If
		End Set
	End Property
End Class