'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:4.0.21006.1
'
'     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

Namespace VB.LINQ2SQL
	
	<Global.System.Data.Linq.Mapping.DatabaseAttribute(Name:="NORTHWND")>  _
	Partial Public Class NorthwindVBDataContext
		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 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 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 InsertProduct(instance As Product)
    End Sub
    Partial Private Sub UpdateProduct(instance As Product)
    End Sub
    Partial Private Sub DeleteProduct(instance As Product)
    End Sub
    #End Region
		
		Public Sub New()
			MyBase.New(Global.System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString, mappingSource)
			OnCreated
		End Sub
		
		Public Sub New(ByVal connection As String)
			MyBase.New(connection, mappingSource)
			OnCreated
		End Sub
		
		Public Sub New(ByVal connection As System.Data.IDbConnection)
			MyBase.New(connection, mappingSource)
			OnCreated
		End Sub
		
		Public Sub New(ByVal connection As String, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
			MyBase.New(connection, mappingSource)
			OnCreated
		End Sub
		
		Public Sub New(ByVal connection As System.Data.IDbConnection, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
			MyBase.New(connection, mappingSource)
			OnCreated
		End Sub
		
		Public ReadOnly Property Customers() As System.Data.Linq.Table(Of Customer)
			Get
				Return Me.GetTable(Of Customer)
			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 Products() As System.Data.Linq.Table(Of Product)
			Get
				Return Me.GetTable(Of Product)
			End Get
		End Property
	End Class
	
	<Global.System.Data.Linq.Mapping.TableAttribute(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
		
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCustomerIDChanging(value As String)
    End Sub
    Partial Private Sub OnCustomerIDChanged()
    End Sub
    Partial Private Sub OnCompanyNameChanging(value As String)
    End Sub
    Partial Private Sub OnCompanyNameChanged()
    End Sub
    Partial Private Sub OnContactNameChanging(value As String)
    End Sub
    Partial Private Sub OnContactNameChanged()
    End Sub
    Partial Private Sub OnContactTitleChanging(value As String)
    End Sub
    Partial Private Sub OnContactTitleChanged()
    End Sub
    Partial Private Sub OnAddressChanging(value As String)
    End Sub
    Partial Private Sub OnAddressChanged()
    End Sub
    Partial Private Sub OnCityChanging(value As String)
    End Sub
    Partial Private Sub OnCityChanged()
    End Sub
    Partial Private Sub OnRegionChanging(value As String)
    End Sub
    Partial Private Sub OnRegionChanged()
    End Sub
    Partial Private Sub OnPostalCodeChanging(value As String)
    End Sub
    Partial Private Sub OnPostalCodeChanged()
    End Sub
    Partial Private Sub OnCountryChanging(value As String)
    End Sub
    Partial Private Sub OnCountryChanged()
    End Sub
    Partial Private Sub OnPhoneChanging(value As String)
    End Sub
    Partial Private Sub OnPhoneChanged()
    End Sub
    Partial Private Sub OnFaxChanging(value As String)
    End Sub
    Partial Private Sub OnFaxChanged()
    End Sub
    #End Region
		
		Public Sub New()
			MyBase.New
			OnCreated
		End Sub
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		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
	
	<Global.System.Data.Linq.Mapping.TableAttribute(Name:="dbo.Categories")>  _
	Partial Public Class Category
		Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
		
		Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
		
		Private _CategoryID As Integer
		
		Private _CategoryName As String
		
		Private _Description As String
		
		Private _Picture As System.Data.Linq.Binary
		
		Private _Products As EntitySet(Of Product)
		
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnCategoryIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnCategoryIDChanged()
    End Sub
    Partial Private Sub OnCategoryNameChanging(value As String)
    End Sub
    Partial Private Sub OnCategoryNameChanged()
    End Sub
    Partial Private Sub OnDescriptionChanging(value As String)
    End Sub
    Partial Private Sub OnDescriptionChanged()
    End Sub
    Partial Private Sub OnPictureChanging(value As System.Data.Linq.Binary)
    End Sub
    Partial Private Sub OnPictureChanged()
    End Sub
    #End Region
		
		Public Sub New()
			MyBase.New
			Me._Products = New EntitySet(Of Product)(AddressOf Me.attach_Products, AddressOf Me.detach_Products)
			OnCreated
		End Sub
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_Picture", DbType:="Image", UpdateCheck:=UpdateCheck.Never)>  _
		Public Property Picture() As System.Data.Linq.Binary
			Get
				Return Me._Picture
			End Get
			Set
				If (Object.Equals(Me._Picture, value) = false) Then
					Me.OnPictureChanging(value)
					Me.SendPropertyChanging
					Me._Picture = value
					Me.SendPropertyChanged("Picture")
					Me.OnPictureChanged
				End If
			End Set
		End Property
		
		<Global.System.Data.Linq.Mapping.AssociationAttribute(Name:="Category_Product", Storage:="_Products", ThisKey:="CategoryID", OtherKey:="CategoryID")>  _
		Public Property Products() As EntitySet(Of Product)
			Get
				Return Me._Products
			End Get
			Set
				Me._Products.Assign(value)
			End Set
		End Property
		
		Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
		
		Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
		
		Protected Overridable Sub SendPropertyChanging()
			If ((Me.PropertyChangingEvent Is Nothing)  _
						= false) Then
				RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
			End If
		End Sub
		
		Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
			If ((Me.PropertyChangedEvent Is Nothing)  _
						= false) Then
				RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
			End If
		End Sub
		
		Private Sub attach_Products(ByVal entity As Product)
			Me.SendPropertyChanging
			entity.Category = Me
		End Sub
		
		Private Sub detach_Products(ByVal entity As Product)
			Me.SendPropertyChanging
			entity.Category = Nothing
		End Sub
	End Class
	
	<Global.System.Data.Linq.Mapping.TableAttribute(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 _Category As EntityRef(Of Category)
		
    #Region "Extensibility Method Definitions"
    Partial Private Sub OnLoaded()
    End Sub
    Partial Private Sub OnValidate(action As System.Data.Linq.ChangeAction)
    End Sub
    Partial Private Sub OnCreated()
    End Sub
    Partial Private Sub OnProductIDChanging(value As Integer)
    End Sub
    Partial Private Sub OnProductIDChanged()
    End Sub
    Partial Private Sub OnProductNameChanging(value As String)
    End Sub
    Partial Private Sub OnProductNameChanged()
    End Sub
    Partial Private Sub OnSupplierIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnSupplierIDChanged()
    End Sub
    Partial Private Sub OnCategoryIDChanging(value As System.Nullable(Of Integer))
    End Sub
    Partial Private Sub OnCategoryIDChanged()
    End Sub
    Partial Private Sub OnQuantityPerUnitChanging(value As String)
    End Sub
    Partial Private Sub OnQuantityPerUnitChanged()
    End Sub
    Partial Private Sub OnUnitPriceChanging(value As System.Nullable(Of Decimal))
    End Sub
    Partial Private Sub OnUnitPriceChanged()
    End Sub
    Partial Private Sub OnUnitsInStockChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnUnitsInStockChanged()
    End Sub
    Partial Private Sub OnUnitsOnOrderChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnUnitsOnOrderChanged()
    End Sub
    Partial Private Sub OnReorderLevelChanging(value As System.Nullable(Of Short))
    End Sub
    Partial Private Sub OnReorderLevelChanged()
    End Sub
    Partial Private Sub OnDiscontinuedChanging(value As Boolean)
    End Sub
    Partial Private Sub OnDiscontinuedChanged()
    End Sub
    #End Region
		
		Public Sub New()
			MyBase.New
			Me._Category = CType(Nothing, EntityRef(Of Category))
			OnCreated
		End Sub
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
					Me.OnSupplierIDChanging(value)
					Me.SendPropertyChanging
					Me._SupplierID = value
					Me.SendPropertyChanged("SupplierID")
					Me.OnSupplierIDChanged
				End If
			End Set
		End Property
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.ColumnAttribute(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
		
		<Global.System.Data.Linq.Mapping.AssociationAttribute(Name:="Category_Product", Storage:="_Category", ThisKey:="CategoryID", OtherKey:="CategoryID", IsForeignKey:=true)>  _
		Public Property Category() As Category
			Get
				Return Me._Category.Entity
			End Get
			Set
				Dim previousValue As Category = Me._Category.Entity
				If ((Object.Equals(previousValue, value) = false)  _
							OrElse (Me._Category.HasLoadedOrAssignedValue = false)) Then
					Me.SendPropertyChanging
					If ((previousValue Is Nothing)  _
								= false) Then
						Me._Category.Entity = Nothing
						previousValue.Products.Remove(Me)
					End If
					Me._Category.Entity = value
					If ((value Is Nothing)  _
								= false) Then
						value.Products.Add(Me)
						Me._CategoryID = value.CategoryID
					Else
						Me._CategoryID = CType(Nothing, Nullable(Of Integer))
					End If
					Me.SendPropertyChanged("Category")
				End If
			End Set
		End Property
		
		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
End Namespace
