
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated from a template.
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Imports System
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Imports System.Data.EntityClient
Imports System.ComponentModel
Imports System.Xml.Serialization
Imports System.Runtime.Serialization

<Assembly: EdmSchemaAttribute("1bd2e2f4-4c58-40f9-80b2-4dfb9239e202")>

#Region "EDM Relationship Metadata"
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Products_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Categories), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Products))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Orders_Customers", "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Customers), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Orders))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Employees_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Employees), "Employees1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Employees))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Orders_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Employees), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Orders))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Order_Details_Orders", "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Orders), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Order_Details))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Order_Details_Products", "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Products), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Order_Details))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Orders_Shippers", "Shippers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Shippers), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Orders))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Products_Suppliers", "Suppliers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, GetType(Suppliers), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Products))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "FK_Territories_Region", "Region", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(Region), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Territories))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "CustomerCustomerDemo", "CustomerDemographics", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(CustomerDemographics), "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Customers))>
<Assembly: EdmRelationshipAttribute("NORTHWNDModel", "EmployeeTerritories", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Employees), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(Territories))>
#End Region

#Region "Contexts"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
Public Partial Class NORTHWNDEntities 
    Inherits ObjectContext

    #Region "Constructors"
    ''' <summary>
    ''' Initializes a new NORTHWNDEntities object using the connection string found in the 'NORTHWNDEntities' section of the application configuration file.
    ''' </summary>
    Public Sub New() 
        MyBase.New("name=NORTHWNDEntities", "NORTHWNDEntities")
        OnContextCreated()
    End Sub

    ''' <summary>
    ''' Initialize a new NORTHWNDEntities object.
    ''' </summary>
    Public Sub New(ByVal connectionString As String)
        MyBase.New(connectionString, "NORTHWNDEntities")
        OnContextCreated()
    End Sub

    ''' <summary>
    ''' Initialize a new NORTHWNDEntities object.
    ''' </summary>
    Public Sub New(ByVal connection As EntityConnection)
        MyBase.New(connection, "NORTHWNDEntities")
        OnContextCreated()
    End Sub
    #End Region
    
    #Region "Partial Methods"
    Partial Private Sub OnContextCreated()
    End Sub
    #End Region
    
    #Region "ObjectSet Properties"

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Categories() As ObjectSet(Of Categories)
        Get
            If (_Categories Is Nothing) Then
                _Categories = MyBase.CreateObjectSet(Of Categories)("Categories")
            End If
            Return _Categories
        End Get
    End Property
    
    Private _Categories As ObjectSet(Of Categories)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property CustomerDemographics() As ObjectSet(Of CustomerDemographics)
        Get
            If (_CustomerDemographics Is Nothing) Then
                _CustomerDemographics = MyBase.CreateObjectSet(Of CustomerDemographics)("CustomerDemographics")
            End If
            Return _CustomerDemographics
        End Get
    End Property
    
    Private _CustomerDemographics As ObjectSet(Of CustomerDemographics)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Customers() As ObjectSet(Of Customers)
        Get
            If (_Customers Is Nothing) Then
                _Customers = MyBase.CreateObjectSet(Of Customers)("Customers")
            End If
            Return _Customers
        End Get
    End Property
    
    Private _Customers As ObjectSet(Of Customers)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Employees() As ObjectSet(Of Employees)
        Get
            If (_Employees Is Nothing) Then
                _Employees = MyBase.CreateObjectSet(Of Employees)("Employees")
            End If
            Return _Employees
        End Get
    End Property
    
    Private _Employees As ObjectSet(Of Employees)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Order_Details() As ObjectSet(Of Order_Details)
        Get
            If (_Order_Details Is Nothing) Then
                _Order_Details = MyBase.CreateObjectSet(Of Order_Details)("Order_Details")
            End If
            Return _Order_Details
        End Get
    End Property
    
    Private _Order_Details As ObjectSet(Of Order_Details)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Orders() As ObjectSet(Of Orders)
        Get
            If (_Orders Is Nothing) Then
                _Orders = MyBase.CreateObjectSet(Of Orders)("Orders")
            End If
            Return _Orders
        End Get
    End Property
    
    Private _Orders As ObjectSet(Of Orders)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Products() As ObjectSet(Of Products)
        Get
            If (_Products Is Nothing) Then
                _Products = MyBase.CreateObjectSet(Of Products)("Products")
            End If
            Return _Products
        End Get
    End Property
    
    Private _Products As ObjectSet(Of Products)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Region() As ObjectSet(Of Region)
        Get
            If (_Region Is Nothing) Then
                _Region = MyBase.CreateObjectSet(Of Region)("Region")
            End If
            Return _Region
        End Get
    End Property
    
    Private _Region As ObjectSet(Of Region)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Shippers() As ObjectSet(Of Shippers)
        Get
            If (_Shippers Is Nothing) Then
                _Shippers = MyBase.CreateObjectSet(Of Shippers)("Shippers")
            End If
            Return _Shippers
        End Get
    End Property
    
    Private _Shippers As ObjectSet(Of Shippers)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Suppliers() As ObjectSet(Of Suppliers)
        Get
            If (_Suppliers Is Nothing) Then
                _Suppliers = MyBase.CreateObjectSet(Of Suppliers)("Suppliers")
            End If
            Return _Suppliers
        End Get
    End Property
    
    Private _Suppliers As ObjectSet(Of Suppliers)

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Public ReadOnly Property Territories() As ObjectSet(Of Territories)
        Get
            If (_Territories Is Nothing) Then
                _Territories = MyBase.CreateObjectSet(Of Territories)("Territories")
            End If
            Return _Territories
        End Get
    End Property
    
    Private _Territories As ObjectSet(Of Territories)
    #End Region
    #Region "AddTo Methods"
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToCategories(ByVal categories As Categories)
        MyBase.AddObject("Categories", categories)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the CustomerDemographics EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToCustomerDemographics(ByVal customerDemographics As CustomerDemographics)
        MyBase.AddObject("CustomerDemographics", customerDemographics)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToCustomers(ByVal customers As Customers)
        MyBase.AddObject("Customers", customers)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToEmployees(ByVal employees As Employees)
        MyBase.AddObject("Employees", employees)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Order_Details EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToOrder_Details(ByVal order_Details As Order_Details)
        MyBase.AddObject("Order_Details", order_Details)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToOrders(ByVal orders As Orders)
        MyBase.AddObject("Orders", orders)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToProducts(ByVal products As Products)
        MyBase.AddObject("Products", products)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Region EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToRegion(ByVal region As Region)
        MyBase.AddObject("Region", region)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Shippers EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToShippers(ByVal shippers As Shippers)
        MyBase.AddObject("Shippers", shippers)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Suppliers EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToSuppliers(ByVal suppliers As Suppliers)
        MyBase.AddObject("Suppliers", suppliers)
    End Sub
    
    ''' <summary>
    ''' Deprecated Method for adding a new object to the Territories EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
    ''' </summary>
    Public Sub AddToTerritories(ByVal territories As Territories)
        MyBase.AddObject("Territories", territories)
    End Sub
    #End Region
End Class

#End Region
#Region "Entities"
''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Categories")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Categories 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Categories object.
    ''' </summary>
    ''' <param name="categoryID">Initial value of the CategoryID property.</param>
    ''' <param name="categoryName">Initial value of the CategoryName property.</param>
    Public Shared Function CreateCategories(categoryID As Global.System.Int32, categoryName As Global.System.String) As Categories
        Dim categories as Categories = New Categories
        categories.CategoryID = categoryID
            
        categories.CategoryName = categoryName
            
        Return categories
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CategoryID() As Global.System.Int32
        Get
            Return _CategoryID
        End Get
        Set
            If (CategoryID <> value) Then
                OnCategoryIDChanging(value)
                ReportPropertyChanging("CategoryID")
                _CategoryID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("CategoryID")
                OnCategoryIDChanged()
            End If
        End Set
    End Property
    
    Private _CategoryID as Global.System.Int32
    Private Partial Sub OnCategoryIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnCategoryIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CategoryName() As Global.System.String
        Get
            Return _CategoryName
        End Get
        Set
            OnCategoryNameChanging(value)
            ReportPropertyChanging("CategoryName")
            _CategoryName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("CategoryName")
            OnCategoryNameChanged()
        End Set
    End Property
    
    Private _CategoryName as Global.System.String
    Private Partial Sub OnCategoryNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCategoryNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Description() As Global.System.String
        Get
            Return _Description
        End Get
        Set
            OnDescriptionChanging(value)
            ReportPropertyChanging("Description")
            _Description = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Description")
            OnDescriptionChanged()
        End Set
    End Property
    
    Private _Description as Global.System.String
    Private Partial Sub OnDescriptionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnDescriptionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Picture() As Global.System.Byte()
        Get
                Return StructuralObject.GetValidValue(_Picture)
        End Get
        Set
            OnPictureChanging(value)
            ReportPropertyChanging("Picture")
            _Picture = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Picture")
            OnPictureChanged()
        End Set
    End Property
    
    Private _Picture as Global.System.Byte()
    Private Partial Sub OnPictureChanging(value As Global.System.Byte())
    End Sub
    
    Private Partial Sub OnPictureChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Products_Categories", "Products")>
     Public Property Products() As EntityCollection(Of Products)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Products)("NORTHWNDModel.FK_Products_Categories", "Products")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Products)("NORTHWNDModel.FK_Products_Categories", "Products", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="CustomerDemographics")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class CustomerDemographics 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new CustomerDemographics object.
    ''' </summary>
    ''' <param name="customerTypeID">Initial value of the CustomerTypeID property.</param>
    Public Shared Function CreateCustomerDemographics(customerTypeID As Global.System.String) As CustomerDemographics
        Dim customerDemographics as CustomerDemographics = New CustomerDemographics
        customerDemographics.CustomerTypeID = customerTypeID
            
        Return customerDemographics
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property CustomerDesc() As Global.System.String
        Get
            Return _CustomerDesc
        End Get
        Set
            OnCustomerDescChanging(value)
            ReportPropertyChanging("CustomerDesc")
            _CustomerDesc = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("CustomerDesc")
            OnCustomerDescChanged()
        End Set
    End Property
    
    Private _CustomerDesc as Global.System.String
    Private Partial Sub OnCustomerDescChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCustomerDescChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CustomerTypeID() As Global.System.String
        Get
            Return _CustomerTypeID
        End Get
        Set
            If (CustomerTypeID <> value) Then
                OnCustomerTypeIDChanging(value)
                ReportPropertyChanging("CustomerTypeID")
                _CustomerTypeID = StructuralObject.SetValidValue(value, False)
                ReportPropertyChanged("CustomerTypeID")
                OnCustomerTypeIDChanged()
            End If
        End Set
    End Property
    
    Private _CustomerTypeID as Global.System.String
    Private Partial Sub OnCustomerTypeIDChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCustomerTypeIDChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "CustomerCustomerDemo", "Customers")>
     Public Property Customers() As EntityCollection(Of Customers)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Customers)("NORTHWNDModel.CustomerCustomerDemo", "Customers")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Customers)("NORTHWNDModel.CustomerCustomerDemo", "Customers", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Customers")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Customers 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Customers object.
    ''' </summary>
    ''' <param name="companyName">Initial value of the CompanyName property.</param>
    ''' <param name="customerID">Initial value of the CustomerID property.</param>
    Public Shared Function CreateCustomers(companyName As Global.System.String, customerID As Global.System.String) As Customers
        Dim customers as Customers = New Customers
        customers.CompanyName = companyName
            
        customers.CustomerID = customerID
            
        Return customers
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Address() As Global.System.String
        Get
            Return _Address
        End Get
        Set
            OnAddressChanging(value)
            ReportPropertyChanging("Address")
            _Address = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Address")
            OnAddressChanged()
        End Set
    End Property
    
    Private _Address as Global.System.String
    Private Partial Sub OnAddressChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnAddressChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property City() As Global.System.String
        Get
            Return _City
        End Get
        Set
            OnCityChanging(value)
            ReportPropertyChanging("City")
            _City = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("City")
            OnCityChanged()
        End Set
    End Property
    
    Private _City as Global.System.String
    Private Partial Sub OnCityChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCityChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CompanyName() As Global.System.String
        Get
            Return _CompanyName
        End Get
        Set
            OnCompanyNameChanging(value)
            ReportPropertyChanging("CompanyName")
            _CompanyName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("CompanyName")
            OnCompanyNameChanged()
        End Set
    End Property
    
    Private _CompanyName as Global.System.String
    Private Partial Sub OnCompanyNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCompanyNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ContactName() As Global.System.String
        Get
            Return _ContactName
        End Get
        Set
            OnContactNameChanging(value)
            ReportPropertyChanging("ContactName")
            _ContactName = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ContactName")
            OnContactNameChanged()
        End Set
    End Property
    
    Private _ContactName as Global.System.String
    Private Partial Sub OnContactNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnContactNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ContactTitle() As Global.System.String
        Get
            Return _ContactTitle
        End Get
        Set
            OnContactTitleChanging(value)
            ReportPropertyChanging("ContactTitle")
            _ContactTitle = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ContactTitle")
            OnContactTitleChanged()
        End Set
    End Property
    
    Private _ContactTitle as Global.System.String
    Private Partial Sub OnContactTitleChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnContactTitleChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Country() As Global.System.String
        Get
            Return _Country
        End Get
        Set
            OnCountryChanging(value)
            ReportPropertyChanging("Country")
            _Country = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Country")
            OnCountryChanged()
        End Set
    End Property
    
    Private _Country as Global.System.String
    Private Partial Sub OnCountryChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCountryChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CustomerID() As Global.System.String
        Get
            Return _CustomerID
        End Get
        Set
            If (CustomerID <> value) Then
                OnCustomerIDChanging(value)
                ReportPropertyChanging("CustomerID")
                _CustomerID = StructuralObject.SetValidValue(value, False)
                ReportPropertyChanged("CustomerID")
                OnCustomerIDChanged()
            End If
        End Set
    End Property
    
    Private _CustomerID as Global.System.String
    Private Partial Sub OnCustomerIDChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCustomerIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Fax() As Global.System.String
        Get
            Return _Fax
        End Get
        Set
            OnFaxChanging(value)
            ReportPropertyChanging("Fax")
            _Fax = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Fax")
            OnFaxChanged()
        End Set
    End Property
    
    Private _Fax as Global.System.String
    Private Partial Sub OnFaxChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnFaxChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Phone() As Global.System.String
        Get
            Return _Phone
        End Get
        Set
            OnPhoneChanging(value)
            ReportPropertyChanging("Phone")
            _Phone = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Phone")
            OnPhoneChanged()
        End Set
    End Property
    
    Private _Phone as Global.System.String
    Private Partial Sub OnPhoneChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPhoneChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property PostalCode() As Global.System.String
        Get
            Return _PostalCode
        End Get
        Set
            OnPostalCodeChanging(value)
            ReportPropertyChanging("PostalCode")
            _PostalCode = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("PostalCode")
            OnPostalCodeChanged()
        End Set
    End Property
    
    Private _PostalCode as Global.System.String
    Private Partial Sub OnPostalCodeChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPostalCodeChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Region() As Global.System.String
        Get
            Return _Region
        End Get
        Set
            OnRegionChanging(value)
            ReportPropertyChanging("Region")
            _Region = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Region")
            OnRegionChanged()
        End Set
    End Property
    
    Private _Region as Global.System.String
    Private Partial Sub OnRegionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnRegionChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Customers", "Orders")>
     Public Property Orders() As EntityCollection(Of Orders)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Customers", "Orders")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Customers", "Orders", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "CustomerCustomerDemo", "CustomerDemographics")>
     Public Property CustomerDemographics() As EntityCollection(Of CustomerDemographics)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of CustomerDemographics)("NORTHWNDModel.CustomerCustomerDemo", "CustomerDemographics")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of CustomerDemographics)("NORTHWNDModel.CustomerCustomerDemo", "CustomerDemographics", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Employees")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Employees 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Employees object.
    ''' </summary>
    ''' <param name="employeeID">Initial value of the EmployeeID property.</param>
    ''' <param name="firstName">Initial value of the FirstName property.</param>
    ''' <param name="lastName">Initial value of the LastName property.</param>
    Public Shared Function CreateEmployees(employeeID As Global.System.Int32, firstName As Global.System.String, lastName As Global.System.String) As Employees
        Dim employees as Employees = New Employees
        employees.EmployeeID = employeeID
            
        employees.FirstName = firstName
            
        employees.LastName = lastName
            
        Return employees
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Address() As Global.System.String
        Get
            Return _Address
        End Get
        Set
            OnAddressChanging(value)
            ReportPropertyChanging("Address")
            _Address = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Address")
            OnAddressChanged()
        End Set
    End Property
    
    Private _Address as Global.System.String
    Private Partial Sub OnAddressChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnAddressChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property BirthDate() As Nullable(Of Global.System.DateTime)
        Get
            Return _BirthDate
        End Get
        Set
            OnBirthDateChanging(value)
            ReportPropertyChanging("BirthDate")
            _BirthDate = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("BirthDate")
            OnBirthDateChanged()
        End Set
    End Property
    
    Private _BirthDate as Nullable(Of Global.System.DateTime)
    Private Partial Sub OnBirthDateChanging(value As Nullable(Of Global.System.DateTime))
    End Sub
    
    Private Partial Sub OnBirthDateChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property City() As Global.System.String
        Get
            Return _City
        End Get
        Set
            OnCityChanging(value)
            ReportPropertyChanging("City")
            _City = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("City")
            OnCityChanged()
        End Set
    End Property
    
    Private _City as Global.System.String
    Private Partial Sub OnCityChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCityChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Country() As Global.System.String
        Get
            Return _Country
        End Get
        Set
            OnCountryChanging(value)
            ReportPropertyChanging("Country")
            _Country = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Country")
            OnCountryChanged()
        End Set
    End Property
    
    Private _Country as Global.System.String
    Private Partial Sub OnCountryChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCountryChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property EmployeeID() As Global.System.Int32
        Get
            Return _EmployeeID
        End Get
        Set
            If (EmployeeID <> value) Then
                OnEmployeeIDChanging(value)
                ReportPropertyChanging("EmployeeID")
                _EmployeeID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("EmployeeID")
                OnEmployeeIDChanged()
            End If
        End Set
    End Property
    
    Private _EmployeeID as Global.System.Int32
    Private Partial Sub OnEmployeeIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnEmployeeIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Extension() As Global.System.String
        Get
            Return _Extension
        End Get
        Set
            OnExtensionChanging(value)
            ReportPropertyChanging("Extension")
            _Extension = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Extension")
            OnExtensionChanged()
        End Set
    End Property
    
    Private _Extension as Global.System.String
    Private Partial Sub OnExtensionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnExtensionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property FirstName() As Global.System.String
        Get
            Return _FirstName
        End Get
        Set
            OnFirstNameChanging(value)
            ReportPropertyChanging("FirstName")
            _FirstName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("FirstName")
            OnFirstNameChanged()
        End Set
    End Property
    
    Private _FirstName as Global.System.String
    Private Partial Sub OnFirstNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnFirstNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property HireDate() As Nullable(Of Global.System.DateTime)
        Get
            Return _HireDate
        End Get
        Set
            OnHireDateChanging(value)
            ReportPropertyChanging("HireDate")
            _HireDate = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("HireDate")
            OnHireDateChanged()
        End Set
    End Property
    
    Private _HireDate as Nullable(Of Global.System.DateTime)
    Private Partial Sub OnHireDateChanging(value As Nullable(Of Global.System.DateTime))
    End Sub
    
    Private Partial Sub OnHireDateChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property HomePhone() As Global.System.String
        Get
            Return _HomePhone
        End Get
        Set
            OnHomePhoneChanging(value)
            ReportPropertyChanging("HomePhone")
            _HomePhone = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("HomePhone")
            OnHomePhoneChanged()
        End Set
    End Property
    
    Private _HomePhone as Global.System.String
    Private Partial Sub OnHomePhoneChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnHomePhoneChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property LastName() As Global.System.String
        Get
            Return _LastName
        End Get
        Set
            OnLastNameChanging(value)
            ReportPropertyChanging("LastName")
            _LastName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("LastName")
            OnLastNameChanged()
        End Set
    End Property
    
    Private _LastName as Global.System.String
    Private Partial Sub OnLastNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnLastNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Notes() As Global.System.String
        Get
            Return _Notes
        End Get
        Set
            OnNotesChanging(value)
            ReportPropertyChanging("Notes")
            _Notes = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Notes")
            OnNotesChanged()
        End Set
    End Property
    
    Private _Notes as Global.System.String
    Private Partial Sub OnNotesChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnNotesChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Photo() As Global.System.Byte()
        Get
                Return StructuralObject.GetValidValue(_Photo)
        End Get
        Set
            OnPhotoChanging(value)
            ReportPropertyChanging("Photo")
            _Photo = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Photo")
            OnPhotoChanged()
        End Set
    End Property
    
    Private _Photo as Global.System.Byte()
    Private Partial Sub OnPhotoChanging(value As Global.System.Byte())
    End Sub
    
    Private Partial Sub OnPhotoChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property PhotoPath() As Global.System.String
        Get
            Return _PhotoPath
        End Get
        Set
            OnPhotoPathChanging(value)
            ReportPropertyChanging("PhotoPath")
            _PhotoPath = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("PhotoPath")
            OnPhotoPathChanged()
        End Set
    End Property
    
    Private _PhotoPath as Global.System.String
    Private Partial Sub OnPhotoPathChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPhotoPathChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property PostalCode() As Global.System.String
        Get
            Return _PostalCode
        End Get
        Set
            OnPostalCodeChanging(value)
            ReportPropertyChanging("PostalCode")
            _PostalCode = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("PostalCode")
            OnPostalCodeChanged()
        End Set
    End Property
    
    Private _PostalCode as Global.System.String
    Private Partial Sub OnPostalCodeChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPostalCodeChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Region() As Global.System.String
        Get
            Return _Region
        End Get
        Set
            OnRegionChanging(value)
            ReportPropertyChanging("Region")
            _Region = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Region")
            OnRegionChanged()
        End Set
    End Property
    
    Private _Region as Global.System.String
    Private Partial Sub OnRegionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnRegionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Title() As Global.System.String
        Get
            Return _Title
        End Get
        Set
            OnTitleChanging(value)
            ReportPropertyChanging("Title")
            _Title = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Title")
            OnTitleChanged()
        End Set
    End Property
    
    Private _Title as Global.System.String
    Private Partial Sub OnTitleChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnTitleChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property TitleOfCourtesy() As Global.System.String
        Get
            Return _TitleOfCourtesy
        End Get
        Set
            OnTitleOfCourtesyChanging(value)
            ReportPropertyChanging("TitleOfCourtesy")
            _TitleOfCourtesy = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("TitleOfCourtesy")
            OnTitleOfCourtesyChanged()
        End Set
    End Property
    
    Private _TitleOfCourtesy as Global.System.String
    Private Partial Sub OnTitleOfCourtesyChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnTitleOfCourtesyChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Employees_Employees", "Employees1")>
     Public Property Employees1() As EntityCollection(Of Employees)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees1")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees1", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Employees_Employees", "Employees")>
    Public Property Employees2() As Employees
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property Employees2Reference() As EntityReference(Of Employees)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Employees)("NORTHWNDModel.FK_Employees_Employees", "Employees", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Employees", "Orders")>
     Public Property Orders() As EntityCollection(Of Orders)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Employees", "Orders")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Employees", "Orders", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "EmployeeTerritories", "Territories")>
     Public Property Territories() As EntityCollection(Of Territories)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Territories)("NORTHWNDModel.EmployeeTerritories", "Territories")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Territories)("NORTHWNDModel.EmployeeTerritories", "Territories", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Order_Details")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Order_Details 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Order_Details object.
    ''' </summary>
    ''' <param name="discount">Initial value of the Discount property.</param>
    ''' <param name="orderID">Initial value of the OrderID property.</param>
    ''' <param name="productID">Initial value of the ProductID property.</param>
    ''' <param name="quantity">Initial value of the Quantity property.</param>
    ''' <param name="unitPrice">Initial value of the UnitPrice property.</param>
    Public Shared Function CreateOrder_Details(discount As Global.System.Single, orderID As Global.System.Int32, productID As Global.System.Int32, quantity As Global.System.Int16, unitPrice As Global.System.Decimal) As Order_Details
        Dim order_Details as Order_Details = New Order_Details
        order_Details.Discount = discount
            
        order_Details.OrderID = orderID
            
        order_Details.ProductID = productID
            
        order_Details.Quantity = quantity
            
        order_Details.UnitPrice = unitPrice
            
        Return order_Details
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property Discount() As Global.System.Single
        Get
            Return _Discount
        End Get
        Set
            OnDiscountChanging(value)
            ReportPropertyChanging("Discount")
            _Discount = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("Discount")
            OnDiscountChanged()
        End Set
    End Property
    
    Private _Discount as Global.System.Single
    Private Partial Sub OnDiscountChanging(value As Global.System.Single)
    End Sub
    
    Private Partial Sub OnDiscountChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property OrderID() As Global.System.Int32
        Get
            Return _OrderID
        End Get
        Set
            If (OrderID <> value) Then
                OnOrderIDChanging(value)
                ReportPropertyChanging("OrderID")
                _OrderID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("OrderID")
                OnOrderIDChanged()
            End If
        End Set
    End Property
    
    Private _OrderID as Global.System.Int32
    Private Partial Sub OnOrderIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnOrderIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property ProductID() As Global.System.Int32
        Get
            Return _ProductID
        End Get
        Set
            If (ProductID <> value) Then
                OnProductIDChanging(value)
                ReportPropertyChanging("ProductID")
                _ProductID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("ProductID")
                OnProductIDChanged()
            End If
        End Set
    End Property
    
    Private _ProductID as Global.System.Int32
    Private Partial Sub OnProductIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnProductIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property Quantity() As Global.System.Int16
        Get
            Return _Quantity
        End Get
        Set
            OnQuantityChanging(value)
            ReportPropertyChanging("Quantity")
            _Quantity = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("Quantity")
            OnQuantityChanged()
        End Set
    End Property
    
    Private _Quantity as Global.System.Int16
    Private Partial Sub OnQuantityChanging(value As Global.System.Int16)
    End Sub
    
    Private Partial Sub OnQuantityChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property UnitPrice() As Global.System.Decimal
        Get
            Return _UnitPrice
        End Get
        Set
            OnUnitPriceChanging(value)
            ReportPropertyChanging("UnitPrice")
            _UnitPrice = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("UnitPrice")
            OnUnitPriceChanged()
        End Set
    End Property
    
    Private _UnitPrice as Global.System.Decimal
    Private Partial Sub OnUnitPriceChanging(value As Global.System.Decimal)
    End Sub
    
    Private Partial Sub OnUnitPriceChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Order_Details_Orders", "Orders")>
    Public Property Orders() As Orders
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Orders)("NORTHWNDModel.FK_Order_Details_Orders", "Orders").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Orders)("NORTHWNDModel.FK_Order_Details_Orders", "Orders").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property OrdersReference() As EntityReference(Of Orders)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Orders)("NORTHWNDModel.FK_Order_Details_Orders", "Orders")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Orders)("NORTHWNDModel.FK_Order_Details_Orders", "Orders", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Order_Details_Products", "Products")>
    Public Property Products() As Products
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Products)("NORTHWNDModel.FK_Order_Details_Products", "Products").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Products)("NORTHWNDModel.FK_Order_Details_Products", "Products").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property ProductsReference() As EntityReference(Of Products)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Products)("NORTHWNDModel.FK_Order_Details_Products", "Products")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Products)("NORTHWNDModel.FK_Order_Details_Products", "Products", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Orders")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Orders 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Orders object.
    ''' </summary>
    ''' <param name="orderID">Initial value of the OrderID property.</param>
    Public Shared Function CreateOrders(orderID As Global.System.Int32) As Orders
        Dim orders as Orders = New Orders
        orders.OrderID = orderID
            
        Return orders
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Freight() As Nullable(Of Global.System.Decimal)
        Get
            Return _Freight
        End Get
        Set
            OnFreightChanging(value)
            ReportPropertyChanging("Freight")
            _Freight = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("Freight")
            OnFreightChanged()
        End Set
    End Property
    
    Private _Freight as Nullable(Of Global.System.Decimal)
    Private Partial Sub OnFreightChanging(value As Nullable(Of Global.System.Decimal))
    End Sub
    
    Private Partial Sub OnFreightChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property OrderDate() As Nullable(Of Global.System.DateTime)
        Get
            Return _OrderDate
        End Get
        Set
            OnOrderDateChanging(value)
            ReportPropertyChanging("OrderDate")
            _OrderDate = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("OrderDate")
            OnOrderDateChanged()
        End Set
    End Property
    
    Private _OrderDate as Nullable(Of Global.System.DateTime)
    Private Partial Sub OnOrderDateChanging(value As Nullable(Of Global.System.DateTime))
    End Sub
    
    Private Partial Sub OnOrderDateChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property OrderID() As Global.System.Int32
        Get
            Return _OrderID
        End Get
        Set
            If (OrderID <> value) Then
                OnOrderIDChanging(value)
                ReportPropertyChanging("OrderID")
                _OrderID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("OrderID")
                OnOrderIDChanged()
            End If
        End Set
    End Property
    
    Private _OrderID as Global.System.Int32
    Private Partial Sub OnOrderIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnOrderIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property RequiredDate() As Nullable(Of Global.System.DateTime)
        Get
            Return _RequiredDate
        End Get
        Set
            OnRequiredDateChanging(value)
            ReportPropertyChanging("RequiredDate")
            _RequiredDate = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("RequiredDate")
            OnRequiredDateChanged()
        End Set
    End Property
    
    Private _RequiredDate as Nullable(Of Global.System.DateTime)
    Private Partial Sub OnRequiredDateChanging(value As Nullable(Of Global.System.DateTime))
    End Sub
    
    Private Partial Sub OnRequiredDateChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipAddress() As Global.System.String
        Get
            Return _ShipAddress
        End Get
        Set
            OnShipAddressChanging(value)
            ReportPropertyChanging("ShipAddress")
            _ShipAddress = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipAddress")
            OnShipAddressChanged()
        End Set
    End Property
    
    Private _ShipAddress as Global.System.String
    Private Partial Sub OnShipAddressChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipAddressChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipCity() As Global.System.String
        Get
            Return _ShipCity
        End Get
        Set
            OnShipCityChanging(value)
            ReportPropertyChanging("ShipCity")
            _ShipCity = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipCity")
            OnShipCityChanged()
        End Set
    End Property
    
    Private _ShipCity as Global.System.String
    Private Partial Sub OnShipCityChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipCityChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipCountry() As Global.System.String
        Get
            Return _ShipCountry
        End Get
        Set
            OnShipCountryChanging(value)
            ReportPropertyChanging("ShipCountry")
            _ShipCountry = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipCountry")
            OnShipCountryChanged()
        End Set
    End Property
    
    Private _ShipCountry as Global.System.String
    Private Partial Sub OnShipCountryChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipCountryChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipName() As Global.System.String
        Get
            Return _ShipName
        End Get
        Set
            OnShipNameChanging(value)
            ReportPropertyChanging("ShipName")
            _ShipName = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipName")
            OnShipNameChanged()
        End Set
    End Property
    
    Private _ShipName as Global.System.String
    Private Partial Sub OnShipNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShippedDate() As Nullable(Of Global.System.DateTime)
        Get
            Return _ShippedDate
        End Get
        Set
            OnShippedDateChanging(value)
            ReportPropertyChanging("ShippedDate")
            _ShippedDate = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("ShippedDate")
            OnShippedDateChanged()
        End Set
    End Property
    
    Private _ShippedDate as Nullable(Of Global.System.DateTime)
    Private Partial Sub OnShippedDateChanging(value As Nullable(Of Global.System.DateTime))
    End Sub
    
    Private Partial Sub OnShippedDateChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipPostalCode() As Global.System.String
        Get
            Return _ShipPostalCode
        End Get
        Set
            OnShipPostalCodeChanging(value)
            ReportPropertyChanging("ShipPostalCode")
            _ShipPostalCode = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipPostalCode")
            OnShipPostalCodeChanged()
        End Set
    End Property
    
    Private _ShipPostalCode as Global.System.String
    Private Partial Sub OnShipPostalCodeChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipPostalCodeChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ShipRegion() As Global.System.String
        Get
            Return _ShipRegion
        End Get
        Set
            OnShipRegionChanging(value)
            ReportPropertyChanging("ShipRegion")
            _ShipRegion = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ShipRegion")
            OnShipRegionChanged()
        End Set
    End Property
    
    Private _ShipRegion as Global.System.String
    Private Partial Sub OnShipRegionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnShipRegionChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Customers", "Customers")>
    Public Property Customers() As Customers
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Customers)("NORTHWNDModel.FK_Orders_Customers", "Customers").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Customers)("NORTHWNDModel.FK_Orders_Customers", "Customers").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property CustomersReference() As EntityReference(Of Customers)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Customers)("NORTHWNDModel.FK_Orders_Customers", "Customers")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Customers)("NORTHWNDModel.FK_Orders_Customers", "Customers", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Employees", "Employees")>
    Public Property Employees() As Employees
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Orders_Employees", "Employees").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Orders_Employees", "Employees").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property EmployeesReference() As EntityReference(Of Employees)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Employees)("NORTHWNDModel.FK_Orders_Employees", "Employees")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Employees)("NORTHWNDModel.FK_Orders_Employees", "Employees", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Order_Details_Orders", "Order_Details")>
     Public Property Order_Details() As EntityCollection(Of Order_Details)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Order_Details)("NORTHWNDModel.FK_Order_Details_Orders", "Order_Details")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Order_Details)("NORTHWNDModel.FK_Order_Details_Orders", "Order_Details", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Shippers", "Shippers")>
    Public Property Shippers() As Shippers
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Shippers)("NORTHWNDModel.FK_Orders_Shippers", "Shippers").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Shippers)("NORTHWNDModel.FK_Orders_Shippers", "Shippers").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property ShippersReference() As EntityReference(Of Shippers)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Shippers)("NORTHWNDModel.FK_Orders_Shippers", "Shippers")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Shippers)("NORTHWNDModel.FK_Orders_Shippers", "Shippers", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Products")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Products 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Products object.
    ''' </summary>
    ''' <param name="discontinued">Initial value of the Discontinued property.</param>
    ''' <param name="productID">Initial value of the ProductID property.</param>
    ''' <param name="productName">Initial value of the ProductName property.</param>
    Public Shared Function CreateProducts(discontinued As Global.System.Boolean, productID As Global.System.Int32, productName As Global.System.String) As Products
        Dim products as Products = New Products
        products.Discontinued = discontinued
            
        products.ProductID = productID
            
        products.ProductName = productName
            
        Return products
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property Discontinued() As Global.System.Boolean
        Get
            Return _Discontinued
        End Get
        Set
            OnDiscontinuedChanging(value)
            ReportPropertyChanging("Discontinued")
            _Discontinued = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("Discontinued")
            OnDiscontinuedChanged()
        End Set
    End Property
    
    Private _Discontinued as Global.System.Boolean
    Private Partial Sub OnDiscontinuedChanging(value As Global.System.Boolean)
    End Sub
    
    Private Partial Sub OnDiscontinuedChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property ProductID() As Global.System.Int32
        Get
            Return _ProductID
        End Get
        Set
            If (ProductID <> value) Then
                OnProductIDChanging(value)
                ReportPropertyChanging("ProductID")
                _ProductID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("ProductID")
                OnProductIDChanged()
            End If
        End Set
    End Property
    
    Private _ProductID as Global.System.Int32
    Private Partial Sub OnProductIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnProductIDChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property ProductName() As Global.System.String
        Get
            Return _ProductName
        End Get
        Set
            OnProductNameChanging(value)
            ReportPropertyChanging("ProductName")
            _ProductName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("ProductName")
            OnProductNameChanged()
        End Set
    End Property
    
    Private _ProductName as Global.System.String
    Private Partial Sub OnProductNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnProductNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property QuantityPerUnit() As Global.System.String
        Get
            Return _QuantityPerUnit
        End Get
        Set
            OnQuantityPerUnitChanging(value)
            ReportPropertyChanging("QuantityPerUnit")
            _QuantityPerUnit = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("QuantityPerUnit")
            OnQuantityPerUnitChanged()
        End Set
    End Property
    
    Private _QuantityPerUnit as Global.System.String
    Private Partial Sub OnQuantityPerUnitChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnQuantityPerUnitChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ReorderLevel() As Nullable(Of Global.System.Int16)
        Get
            Return _ReorderLevel
        End Get
        Set
            OnReorderLevelChanging(value)
            ReportPropertyChanging("ReorderLevel")
            _ReorderLevel = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("ReorderLevel")
            OnReorderLevelChanged()
        End Set
    End Property
    
    Private _ReorderLevel as Nullable(Of Global.System.Int16)
    Private Partial Sub OnReorderLevelChanging(value As Nullable(Of Global.System.Int16))
    End Sub
    
    Private Partial Sub OnReorderLevelChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property UnitPrice() As Nullable(Of Global.System.Decimal)
        Get
            Return _UnitPrice
        End Get
        Set
            OnUnitPriceChanging(value)
            ReportPropertyChanging("UnitPrice")
            _UnitPrice = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("UnitPrice")
            OnUnitPriceChanged()
        End Set
    End Property
    
    Private _UnitPrice as Nullable(Of Global.System.Decimal)
    Private Partial Sub OnUnitPriceChanging(value As Nullable(Of Global.System.Decimal))
    End Sub
    
    Private Partial Sub OnUnitPriceChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property UnitsInStock() As Nullable(Of Global.System.Int16)
        Get
            Return _UnitsInStock
        End Get
        Set
            OnUnitsInStockChanging(value)
            ReportPropertyChanging("UnitsInStock")
            _UnitsInStock = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("UnitsInStock")
            OnUnitsInStockChanged()
        End Set
    End Property
    
    Private _UnitsInStock as Nullable(Of Global.System.Int16)
    Private Partial Sub OnUnitsInStockChanging(value As Nullable(Of Global.System.Int16))
    End Sub
    
    Private Partial Sub OnUnitsInStockChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property UnitsOnOrder() As Nullable(Of Global.System.Int16)
        Get
            Return _UnitsOnOrder
        End Get
        Set
            OnUnitsOnOrderChanging(value)
            ReportPropertyChanging("UnitsOnOrder")
            _UnitsOnOrder = StructuralObject.SetValidValue(value)
            ReportPropertyChanged("UnitsOnOrder")
            OnUnitsOnOrderChanged()
        End Set
    End Property
    
    Private _UnitsOnOrder as Nullable(Of Global.System.Int16)
    Private Partial Sub OnUnitsOnOrderChanging(value As Nullable(Of Global.System.Int16))
    End Sub
    
    Private Partial Sub OnUnitsOnOrderChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Products_Categories", "Categories")>
    Public Property Categories() As Categories
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Categories)("NORTHWNDModel.FK_Products_Categories", "Categories").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Categories)("NORTHWNDModel.FK_Products_Categories", "Categories").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property CategoriesReference() As EntityReference(Of Categories)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Categories)("NORTHWNDModel.FK_Products_Categories", "Categories")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Categories)("NORTHWNDModel.FK_Products_Categories", "Categories", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Order_Details_Products", "Order_Details")>
     Public Property Order_Details() As EntityCollection(Of Order_Details)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Order_Details)("NORTHWNDModel.FK_Order_Details_Products", "Order_Details")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Order_Details)("NORTHWNDModel.FK_Order_Details_Products", "Order_Details", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Products_Suppliers", "Suppliers")>
    Public Property Suppliers() As Suppliers
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Suppliers)("NORTHWNDModel.FK_Products_Suppliers", "Suppliers").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Suppliers)("NORTHWNDModel.FK_Products_Suppliers", "Suppliers").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property SuppliersReference() As EntityReference(Of Suppliers)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Suppliers)("NORTHWNDModel.FK_Products_Suppliers", "Suppliers")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Suppliers)("NORTHWNDModel.FK_Products_Suppliers", "Suppliers", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Region")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Region 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Region object.
    ''' </summary>
    ''' <param name="regionDescription">Initial value of the RegionDescription property.</param>
    ''' <param name="regionID">Initial value of the RegionID property.</param>
    Public Shared Function CreateRegion(regionDescription As Global.System.String, regionID As Global.System.Int32) As Region
        Dim region as Region = New Region
        region.RegionDescription = regionDescription
            
        region.RegionID = regionID
            
        Return region
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property RegionDescription() As Global.System.String
        Get
            Return _RegionDescription
        End Get
        Set
            OnRegionDescriptionChanging(value)
            ReportPropertyChanging("RegionDescription")
            _RegionDescription = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("RegionDescription")
            OnRegionDescriptionChanged()
        End Set
    End Property
    
    Private _RegionDescription as Global.System.String
    Private Partial Sub OnRegionDescriptionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnRegionDescriptionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property RegionID() As Global.System.Int32
        Get
            Return _RegionID
        End Get
        Set
            If (RegionID <> value) Then
                OnRegionIDChanging(value)
                ReportPropertyChanging("RegionID")
                _RegionID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("RegionID")
                OnRegionIDChanged()
            End If
        End Set
    End Property
    
    Private _RegionID as Global.System.Int32
    Private Partial Sub OnRegionIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnRegionIDChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Territories_Region", "Territories")>
     Public Property Territories() As EntityCollection(Of Territories)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Territories)("NORTHWNDModel.FK_Territories_Region", "Territories")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Territories)("NORTHWNDModel.FK_Territories_Region", "Territories", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Shippers")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Shippers 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Shippers object.
    ''' </summary>
    ''' <param name="companyName">Initial value of the CompanyName property.</param>
    ''' <param name="shipperID">Initial value of the ShipperID property.</param>
    Public Shared Function CreateShippers(companyName As Global.System.String, shipperID As Global.System.Int32) As Shippers
        Dim shippers as Shippers = New Shippers
        shippers.CompanyName = companyName
            
        shippers.ShipperID = shipperID
            
        Return shippers
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CompanyName() As Global.System.String
        Get
            Return _CompanyName
        End Get
        Set
            OnCompanyNameChanging(value)
            ReportPropertyChanging("CompanyName")
            _CompanyName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("CompanyName")
            OnCompanyNameChanged()
        End Set
    End Property
    
    Private _CompanyName as Global.System.String
    Private Partial Sub OnCompanyNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCompanyNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Phone() As Global.System.String
        Get
            Return _Phone
        End Get
        Set
            OnPhoneChanging(value)
            ReportPropertyChanging("Phone")
            _Phone = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Phone")
            OnPhoneChanged()
        End Set
    End Property
    
    Private _Phone as Global.System.String
    Private Partial Sub OnPhoneChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPhoneChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property ShipperID() As Global.System.Int32
        Get
            Return _ShipperID
        End Get
        Set
            If (ShipperID <> value) Then
                OnShipperIDChanging(value)
                ReportPropertyChanging("ShipperID")
                _ShipperID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("ShipperID")
                OnShipperIDChanged()
            End If
        End Set
    End Property
    
    Private _ShipperID as Global.System.Int32
    Private Partial Sub OnShipperIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnShipperIDChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Orders_Shippers", "Orders")>
     Public Property Orders() As EntityCollection(Of Orders)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Shippers", "Orders")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Orders)("NORTHWNDModel.FK_Orders_Shippers", "Orders", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Suppliers")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Suppliers 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Suppliers object.
    ''' </summary>
    ''' <param name="companyName">Initial value of the CompanyName property.</param>
    ''' <param name="supplierID">Initial value of the SupplierID property.</param>
    Public Shared Function CreateSuppliers(companyName As Global.System.String, supplierID As Global.System.Int32) As Suppliers
        Dim suppliers as Suppliers = New Suppliers
        suppliers.CompanyName = companyName
            
        suppliers.SupplierID = supplierID
            
        Return suppliers
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Address() As Global.System.String
        Get
            Return _Address
        End Get
        Set
            OnAddressChanging(value)
            ReportPropertyChanging("Address")
            _Address = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Address")
            OnAddressChanged()
        End Set
    End Property
    
    Private _Address as Global.System.String
    Private Partial Sub OnAddressChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnAddressChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property City() As Global.System.String
        Get
            Return _City
        End Get
        Set
            OnCityChanging(value)
            ReportPropertyChanging("City")
            _City = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("City")
            OnCityChanged()
        End Set
    End Property
    
    Private _City as Global.System.String
    Private Partial Sub OnCityChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCityChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property CompanyName() As Global.System.String
        Get
            Return _CompanyName
        End Get
        Set
            OnCompanyNameChanging(value)
            ReportPropertyChanging("CompanyName")
            _CompanyName = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("CompanyName")
            OnCompanyNameChanged()
        End Set
    End Property
    
    Private _CompanyName as Global.System.String
    Private Partial Sub OnCompanyNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCompanyNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ContactName() As Global.System.String
        Get
            Return _ContactName
        End Get
        Set
            OnContactNameChanging(value)
            ReportPropertyChanging("ContactName")
            _ContactName = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ContactName")
            OnContactNameChanged()
        End Set
    End Property
    
    Private _ContactName as Global.System.String
    Private Partial Sub OnContactNameChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnContactNameChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property ContactTitle() As Global.System.String
        Get
            Return _ContactTitle
        End Get
        Set
            OnContactTitleChanging(value)
            ReportPropertyChanging("ContactTitle")
            _ContactTitle = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("ContactTitle")
            OnContactTitleChanged()
        End Set
    End Property
    
    Private _ContactTitle as Global.System.String
    Private Partial Sub OnContactTitleChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnContactTitleChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Country() As Global.System.String
        Get
            Return _Country
        End Get
        Set
            OnCountryChanging(value)
            ReportPropertyChanging("Country")
            _Country = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Country")
            OnCountryChanged()
        End Set
    End Property
    
    Private _Country as Global.System.String
    Private Partial Sub OnCountryChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnCountryChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Fax() As Global.System.String
        Get
            Return _Fax
        End Get
        Set
            OnFaxChanging(value)
            ReportPropertyChanging("Fax")
            _Fax = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Fax")
            OnFaxChanged()
        End Set
    End Property
    
    Private _Fax as Global.System.String
    Private Partial Sub OnFaxChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnFaxChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property HomePage() As Global.System.String
        Get
            Return _HomePage
        End Get
        Set
            OnHomePageChanging(value)
            ReportPropertyChanging("HomePage")
            _HomePage = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("HomePage")
            OnHomePageChanged()
        End Set
    End Property
    
    Private _HomePage as Global.System.String
    Private Partial Sub OnHomePageChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnHomePageChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Phone() As Global.System.String
        Get
            Return _Phone
        End Get
        Set
            OnPhoneChanging(value)
            ReportPropertyChanging("Phone")
            _Phone = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Phone")
            OnPhoneChanged()
        End Set
    End Property
    
    Private _Phone as Global.System.String
    Private Partial Sub OnPhoneChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPhoneChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property PostalCode() As Global.System.String
        Get
            Return _PostalCode
        End Get
        Set
            OnPostalCodeChanging(value)
            ReportPropertyChanging("PostalCode")
            _PostalCode = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("PostalCode")
            OnPostalCodeChanged()
        End Set
    End Property
    
    Private _PostalCode as Global.System.String
    Private Partial Sub OnPostalCodeChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnPostalCodeChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=true)>
    <DataMemberAttribute()>
    Public Property Region() As Global.System.String
        Get
            Return _Region
        End Get
        Set
            OnRegionChanging(value)
            ReportPropertyChanging("Region")
            _Region = StructuralObject.SetValidValue(value, True)
            ReportPropertyChanged("Region")
            OnRegionChanged()
        End Set
    End Property
    
    Private _Region as Global.System.String
    Private Partial Sub OnRegionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnRegionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property SupplierID() As Global.System.Int32
        Get
            Return _SupplierID
        End Get
        Set
            If (SupplierID <> value) Then
                OnSupplierIDChanging(value)
                ReportPropertyChanging("SupplierID")
                _SupplierID = StructuralObject.SetValidValue(value)
                ReportPropertyChanged("SupplierID")
                OnSupplierIDChanged()
            End If
        End Set
    End Property
    
    Private _SupplierID as Global.System.Int32
    Private Partial Sub OnSupplierIDChanging(value As Global.System.Int32)
    End Sub
    
    Private Partial Sub OnSupplierIDChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Products_Suppliers", "Products")>
     Public Property Products() As EntityCollection(Of Products)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Products)("NORTHWNDModel.FK_Products_Suppliers", "Products")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Products)("NORTHWNDModel.FK_Products_Suppliers", "Products", value)
            End If
        End Set
    End Property
    #End Region
End Class

''' <summary>
''' No Metadata Documentation available.
''' </summary>
<EdmEntityTypeAttribute(NamespaceName:="NORTHWNDModel", Name:="Territories")>
<Serializable()>
<DataContractAttribute(IsReference:=True)>
Public Partial Class Territories 
    Inherits EntityObject
    #Region "Factory Method"
        
    ''' <summary>
    ''' Create a new Territories object.
    ''' </summary>
    ''' <param name="territoryDescription">Initial value of the TerritoryDescription property.</param>
    ''' <param name="territoryID">Initial value of the TerritoryID property.</param>
    Public Shared Function CreateTerritories(territoryDescription As Global.System.String, territoryID As Global.System.String) As Territories
        Dim territories as Territories = New Territories
        territories.TerritoryDescription = territoryDescription
            
        territories.TerritoryID = territoryID
            
        Return territories
    End Function
    #End Region
    #Region "Primitive Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=false, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property TerritoryDescription() As Global.System.String
        Get
            Return _TerritoryDescription
        End Get
        Set
            OnTerritoryDescriptionChanging(value)
            ReportPropertyChanging("TerritoryDescription")
            _TerritoryDescription = StructuralObject.SetValidValue(value, False)
            ReportPropertyChanged("TerritoryDescription")
            OnTerritoryDescriptionChanged()
        End Set
    End Property
    
    Private _TerritoryDescription as Global.System.String
    Private Partial Sub OnTerritoryDescriptionChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnTerritoryDescriptionChanged()
    End Sub
    
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmScalarPropertyAttribute(EntityKeyProperty:=true, IsNullable:=false)>
    <DataMemberAttribute()>
    Public Property TerritoryID() As Global.System.String
        Get
            Return _TerritoryID
        End Get
        Set
            If (TerritoryID <> value) Then
                OnTerritoryIDChanging(value)
                ReportPropertyChanging("TerritoryID")
                _TerritoryID = StructuralObject.SetValidValue(value, False)
                ReportPropertyChanged("TerritoryID")
                OnTerritoryIDChanged()
            End If
        End Set
    End Property
    
    Private _TerritoryID as Global.System.String
    Private Partial Sub OnTerritoryIDChanging(value As Global.System.String)
    End Sub
    
    Private Partial Sub OnTerritoryIDChanged()
    End Sub
    
    #End Region
    #Region "Navigation Properties"
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "FK_Territories_Region", "Region")>
    Public Property Region() As Region
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Region)("NORTHWNDModel.FK_Territories_Region", "Region").Value
        End Get
        Set
            CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Region)("NORTHWNDModel.FK_Territories_Region", "Region").Value = value
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <BrowsableAttribute(False)>
    <DataMemberAttribute()>
    Public Property RegionReference() As EntityReference(Of Region)
        Get
            Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Region)("NORTHWNDModel.FK_Territories_Region", "Region")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Region)("NORTHWNDModel.FK_Territories_Region", "Region", value)
            End If
        End Set
    End Property
    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <XmlIgnoreAttribute()>
    <SoapIgnoreAttribute()>
    <DataMemberAttribute()>
    <EdmRelationshipNavigationPropertyAttribute("NORTHWNDModel", "EmployeeTerritories", "Employees")>
     Public Property Employees() As EntityCollection(Of Employees)
        Get
            Return CType(Me,IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Employees)("NORTHWNDModel.EmployeeTerritories", "Employees")
        End Get
        Set
            If (Not value Is Nothing)
                CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Employees)("NORTHWNDModel.EmployeeTerritories", "Employees", value)
            End If
        End Set
    End Property
    #End Region
End Class

#End Region

