LightSwitch HTML Client Tutorial - Contoso Moving

This tutorial walks through building out the mobile client used by Contoso Movers’ planning specialists. This sample was created for Visual Studio 2012, but it will also upgrade and run in Visual Studio 2013.

VB.NET (6.3 MB)
 
 
 
 
 
4.5 Star
(13)
16,365 times
Add to favorites
12/6/2013
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

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

Option Strict On
Option Explicit On

Namespace LightSwitchApplication.Implementation
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Class ApplicationDataDataService
        Inherits Global.Microsoft.LightSwitch.ServerGenerated.Implementation.DataService(Of Global.ApplicationData.Implementation.ApplicationDataObjectContext)
    
        Public Sub New()
            MyBase.New()
        End Sub
    
        Protected Overrides Function CreateDataService() As Global.Microsoft.LightSwitch.IDataService
            Return New Global.LightSwitchApplication.DataWorkspace().ApplicationData
        End Function
    
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Class ApplicationDataServiceImplementation
        Inherits Global.Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation(Of Global.ApplicationData.Implementation.ApplicationDataObjectContext)
    
        Public Sub New(ByVal dataService As Global.Microsoft.LightSwitch.IDataService)
            MyBase.New(dataService)
        End Sub
    
    #Region "Queries"
        Public Function AvailableEmployees(ByVal StartTime As Global.System.Nullable(Of Date), ByVal EndTime As Global.System.Nullable(Of Date)) As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Employee)
            Dim query As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Employee)
            query = Me.GetQuery(Of Global.ApplicationData.Implementation.Employee)("Employees")
            Return query
        End Function
    
        Public Function UpcomingAppointments() As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Appointment)
            Dim query As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Appointment)
            query = Global.System.Linq.Queryable.OrderBy( _
                Me.GetQuery(Of Global.ApplicationData.Implementation.Appointment)("Appointments"), _
                Function(a) a.StartDate)
            Return query
        End Function
    
        Public Function UpcomingAppointmentsForAllEmployees() As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Appointment)
            Dim query As Global.System.Linq.IQueryable(Of Global.ApplicationData.Implementation.Appointment)
            query = Global.System.Linq.Queryable.OrderBy( _
                Me.GetQuery(Of Global.ApplicationData.Implementation.Appointment)("Appointments"), _
                Function(a) a.StartDate)
            Return query
        End Function
    
    #End Region

    #Region "Protected methods"
        Protected Overrides Function CreateObject(ByVal type As Global.System.Type) As Object
            If (type Is GetType(Global.ApplicationData.Implementation.Customer)) Then
                Return New Global.ApplicationData.Implementation.Customer
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.State)) Then
                Return New Global.ApplicationData.Implementation.State
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.Appointment)) Then
                Return New Global.ApplicationData.Implementation.Appointment
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.Employee)) Then
                Return New Global.ApplicationData.Implementation.Employee
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.Photo)) Then
                Return New Global.ApplicationData.Implementation.Photo
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.Room)) Then
                Return New Global.ApplicationData.Implementation.Room
            End If
            If (type Is GetType(Global.ApplicationData.Implementation.InventoryItem)) Then
                Return New Global.ApplicationData.Implementation.InventoryItem
            End If
    
            Return MyBase.CreateObject(type)
        End Function
    
        Protected Overrides Function CreateObjectContext() As Global.ApplicationData.Implementation.ApplicationDataObjectContext
            Dim assemblyName As String = Global.System.Reflection.Assembly.GetExecutingAssembly().GetName().Name
            Return New Global.ApplicationData.Implementation.ApplicationDataObjectContext(MyBase.GetEntityConnectionString( _
                "_IntrinsicData", _
                "res://" + assemblyName + "/ApplicationData.csdl|res://" + assemblyName + "/ApplicationData.ssdl|res://" + assemblyName + "/ApplicationData.msl", _
                "System.Data.SqlClient"))
        End Function
    
        Protected Overrides Function CreateEntityImplementation(Of T As Global.Microsoft.LightSwitch.IEntityObject)() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.Customer)) Then
                Return New Global.ApplicationData.Implementation.Customer()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.State)) Then
                Return New Global.ApplicationData.Implementation.State()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.Appointment)) Then
                Return New Global.ApplicationData.Implementation.Appointment()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.Employee)) Then
                Return New Global.ApplicationData.Implementation.Employee()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.Photo)) Then
                Return New Global.ApplicationData.Implementation.Photo()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.Room)) Then
                Return New Global.ApplicationData.Implementation.Room()
            End If
            If GetType(T).Equals(GetType(Global.LightSwitchApplication.InventoryItem)) Then
                Return New Global.ApplicationData.Implementation.InventoryItem()
            End If
            Return Nothing
        End Function
    
    #End Region
    
    End Class
    
    
    #Region "DataServiceImplementationFactory"
    <Global.System.ComponentModel.Composition.PartCreationPolicy(Global.System.ComponentModel.Composition.CreationPolicy.Shared)> _
    <Global.System.ComponentModel.Composition.Export(GetType(Global.Microsoft.LightSwitch.Internal.IDataServiceFactory))> _
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Class DataServiceFactory
        Inherits Global.Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceFactory
    
        Protected Overrides Function CreateDataService(ByVal dataServiceType As Global.System.Type) As Global.Microsoft.LightSwitch.IDataService
            If dataServiceType.Equals(GetType(Global.LightSwitchApplication.ApplicationData)) Then
                Return New Global.LightSwitchApplication.ApplicationDataService()
            End If
            Return MyBase.CreateDataService(dataServiceType)
        End Function
    
        Protected Overrides Function CreateDataServiceImplementation(Of TDataService As Global.Microsoft.LightSwitch.IDataService)(ByVal dataService As TDataService) As Global.Microsoft.LightSwitch.Internal.IDataServiceImplementation
            If GetType(TDataService).Equals(GetType(Global.LightSwitchApplication.ApplicationData)) Then
                Return New Global.LightSwitchApplication.Implementation.ApplicationDataServiceImplementation(dataService)
            End If
            Return MyBase.CreateDataServiceImplementation(dataService)
        End Function
    End Class
    #End Region
    
    <Global.System.ComponentModel.Composition.PartCreationPolicy(Global.System.ComponentModel.Composition.CreationPolicy.Shared)> _
    <Global.System.ComponentModel.Composition.Export(GetType(Global.Microsoft.LightSwitch.Internal.ITypeMappingProvider))> _
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Public Class __TypeMapping
        Implements Global.Microsoft.LightSwitch.Internal.ITypeMappingProvider
        Private Function GetImplementationType(ByVal definitionType As Global.System.Type) As Global.System.Type Implements Global.Microsoft.LightSwitch.Internal.ITypeMappingProvider.GetImplementationType
            If GetType(Global.LightSwitchApplication.Customer).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.Customer)
            End If
            If GetType(Global.LightSwitchApplication.State).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.State)
            End If
            If GetType(Global.LightSwitchApplication.Appointment).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.Appointment)
            End If
            If GetType(Global.LightSwitchApplication.Employee).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.Employee)
            End If
            If GetType(Global.LightSwitchApplication.Photo).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.Photo)
            End If
            If GetType(Global.LightSwitchApplication.Room).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.Room)
            End If
            If GetType(Global.LightSwitchApplication.InventoryItem).Equals(definitionType)
                Return GetType(Global.ApplicationData.Implementation.InventoryItem)
            End If
            Return Nothing
        End Function
    End Class
End Namespace

Namespace ApplicationData.Implementation

    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class Customer
        Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _LastNameImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.LastName
            Get
                Return Me.LastName
            End Get
            Set(ByVal value As String)
                Me.LastName = value
            End Set
        End Property
        
        Private Property _FirstNameImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.FirstName
            Get
                Return Me.FirstName
            End Get
            Set(ByVal value As String)
                Me.FirstName = value
            End Set
        End Property
        
        Private Property _PhoneImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.Phone
            Get
                Return Me.Phone
            End Get
            Set(ByVal value As String)
                Me.Phone = value
            End Set
        End Property
        
        Private Property _EmailImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.Email
            Get
                Return Me.Email
            End Get
            Set(ByVal value As String)
                Me.Email = value
            End Set
        End Property
        
        Private Property _StreetImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.Street
            Get
                Return Me.Street
            End Get
            Set(ByVal value As String)
                Me.Street = value
            End Set
        End Property
        
        Private Property _StreetLine2Implementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.StreetLine2
            Get
                Return Me.StreetLine2
            End Get
            Set(ByVal value As String)
                Me.StreetLine2 = value
            End Set
        End Property
        
        Private Property _CityImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.City
            Get
                Return Me.City
            End Get
            Set(ByVal value As String)
                Me.City = value
            End Set
        End Property
        
        Private Property _PostalCodeImplementation() As String Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.PostalCode
            Get
                Return Me.PostalCode
            End Get
            Set(ByVal value As String)
                Me.PostalCode = value
            End Set
        End Property
        
        Private Property _StateImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.State
            Get
                Return Me.State
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.State = DirectCast(value, Global.ApplicationData.Implementation.State)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("State")
                End If
            End Set
        End Property
        
        Private ReadOnly Property _AppointmentsImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.Customer.DetailsClass.IImplementation.Appointments
            Get
                Return Me.Appointments
            End Get
        End Property
        
        Private Sub OnCustomer_StateChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("State")
            End If
        End Sub
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class State
        Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _NameImplementation() As String Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.Name
            Get
                Return Me.Name
            End Get
            Set(ByVal value As String)
                Me.Name = value
            End Set
        End Property
        
        Private Property _AbbreviationImplementation() As String Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.Abbreviation
            Get
                Return Me.Abbreviation
            End Get
            Set(ByVal value As String)
                Me.Abbreviation = value
            End Set
        End Property
        
        Private ReadOnly Property _CustomersImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.Customers
            Get
                Return Me.Customers
            End Get
        End Property
        
        Private ReadOnly Property _AppointmentsImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.State.DetailsClass.IImplementation.Appointments
            Get
                Return Me.Appointments
            End Get
        End Property
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class Appointment
        Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _StartDateImplementation() As Date Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.StartDate
            Get
                Return Me.StartDate
            End Get
            Set(ByVal value As Date)
                Me.StartDate = value
            End Set
        End Property
        
        Private Property _EndDateImplementation() As Date Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.EndDate
            Get
                Return Me.EndDate
            End Get
            Set(ByVal value As Date)
                Me.EndDate = value
            End Set
        End Property
        
        Private Property _StreetImplementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Street
            Get
                Return Me.Street
            End Get
            Set(ByVal value As String)
                Me.Street = value
            End Set
        End Property
        
        Private Property _StreetLine2Implementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.StreetLine2
            Get
                Return Me.StreetLine2
            End Get
            Set(ByVal value As String)
                Me.StreetLine2 = value
            End Set
        End Property
        
        Private Property _CityImplementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.City
            Get
                Return Me.City
            End Get
            Set(ByVal value As String)
                Me.City = value
            End Set
        End Property
        
        Private Property _PostalCodeImplementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.PostalCode
            Get
                Return Me.PostalCode
            End Get
            Set(ByVal value As String)
                Me.PostalCode = value
            End Set
        End Property
        
        Private Property _NotesImplementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Notes
            Get
                Return Me.Notes
            End Get
            Set(ByVal value As String)
                Me.Notes = value
            End Set
        End Property
        
        Private Property _MoveTypeImplementation() As String Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.MoveType
            Get
                Return Me.MoveType
            End Get
            Set(ByVal value As String)
                Me.MoveType = value
            End Set
        End Property
        
        Private Property _StateImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.State
            Get
                Return Me.State
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.State = DirectCast(value, Global.ApplicationData.Implementation.State)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("State")
                End If
            End Set
        End Property
        
        Private ReadOnly Property _PhotosImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Photos
            Get
                Return Me.Photos
            End Get
        End Property
        
        Private Property _EmployeeImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Employee
            Get
                Return Me.Employee
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.Employee = DirectCast(value, Global.ApplicationData.Implementation.Employee)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("Employee")
                End If
            End Set
        End Property
        
        Private ReadOnly Property _RoomsImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Rooms
            Get
                Return Me.Rooms
            End Get
        End Property
        
        Private Property _CustomerImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Appointment.DetailsClass.IImplementation.Customer
            Get
                Return Me.Customer
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.Customer = DirectCast(value, Global.ApplicationData.Implementation.Customer)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("Customer")
                End If
            End Set
        End Property
        
        Private Sub OnAppointment_StateChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("State")
            End If
        End Sub
        
        Private Sub OnAppointment_EmployeeChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("Employee")
            End If
        End Sub
        
        Private Sub OnAppointment_CustomerChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("Customer")
            End If
        End Sub
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class Employee
        Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _FirstNameImplementation() As String Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.FirstName
            Get
                Return Me.FirstName
            End Get
            Set(ByVal value As String)
                Me.FirstName = value
            End Set
        End Property
        
        Private Property _LastNameImplementation() As String Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.LastName
            Get
                Return Me.LastName
            End Get
            Set(ByVal value As String)
                Me.LastName = value
            End Set
        End Property
        
        Private Property _UserNameImplementation() As String Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.UserName
            Get
                Return Me.UserName
            End Get
            Set(ByVal value As String)
                Me.UserName = value
            End Set
        End Property
        
        Private Property _EmailImplementation() As String Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.Email
            Get
                Return Me.Email
            End Get
            Set(ByVal value As String)
                Me.Email = value
            End Set
        End Property
        
        Private Property _PhoneImplementation() As String Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.Phone
            Get
                Return Me.Phone
            End Get
            Set(ByVal value As String)
                Me.Phone = value
            End Set
        End Property
        
        Private ReadOnly Property _AppointmentsImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.Employee.DetailsClass.IImplementation.Appointments
            Get
                Return Me.Appointments
            End Get
        End Property
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class Photo
        Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _PictureImplementation() As Byte() Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation.Picture
            Get
                Return Me.Picture
            End Get
            Set(ByVal value As Byte())
                Me.Picture = value
            End Set
        End Property
        
        Private Property _CaptionImplementation() As String Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation.Caption
            Get
                Return Me.Caption
            End Get
            Set(ByVal value As String)
                Me.Caption = value
            End Set
        End Property
        
        Private Property _AppointmentImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Photo.DetailsClass.IImplementation.Appointment
            Get
                Return Me.Appointment
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.Appointment = DirectCast(value, Global.ApplicationData.Implementation.Appointment)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("Appointment")
                End If
            End Set
        End Property
        
        Private Sub OnAppointmentPhoto_AppointmentChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("Appointment")
            End If
        End Sub
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class Room
        Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _NameImplementation() As String Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.Name
            Get
                Return Me.Name
            End Get
            Set(ByVal value As String)
                Me.Name = value
            End Set
        End Property
        
        Private Property _NotesImplementation() As String Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.Notes
            Get
                Return Me.Notes
            End Get
            Set(ByVal value As String)
                Me.Notes = value
            End Set
        End Property
        
        Private ReadOnly Property _InventoryItemsImplementation() As Global.System.Collections.IEnumerable Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.InventoryItems
            Get
                Return Me.InventoryItems
            End Get
        End Property
        
        Private Property _AppointmentImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.Room.DetailsClass.IImplementation.Appointment
            Get
                Return Me.Appointment
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.Appointment = DirectCast(value, Global.ApplicationData.Implementation.Appointment)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("Appointment")
                End If
            End Set
        End Property
        
        Private Sub OnAppointment_RoomChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("Appointment")
            End If
        End Sub
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "11.0.0.0")> _
    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
    Partial Public Class InventoryItem
        Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation

        Private Property _IdImplementation() As Integer Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation.Id
            Get
                Return Me.Id
            End Get
            Set(ByVal value As Integer)
                Me.Id = value
            End Set
        End Property
        
        Private Property _RowVersionImplementation() As Byte() Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation.RowVersion
            Get
                Return Me.RowVersion
            End Get
            Set(ByVal value As Byte())
                Me.RowVersion = value
            End Set
        End Property
        
        Private Property _NameImplementation() As String Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation.Name
            Get
                Return Me.Name
            End Get
            Set(ByVal value As String)
                Me.Name = value
            End Set
        End Property
        
        Private Property _QuantityImplementation() As Integer Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation.Quantity
            Get
                Return Me.Quantity
            End Get
            Set(ByVal value As Integer)
                Me.Quantity = value
            End Set
        End Property
        
        Private Property _RoomImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementation Implements Global.LightSwitchApplication.InventoryItem.DetailsClass.IImplementation.Room
            Get
                Return Me.Room
            End Get
            Set(ByVal value As Global.Microsoft.LightSwitch.Internal.IEntityImplementation)
                Me.Room = DirectCast(value, Global.ApplicationData.Implementation.Room)
                If Me.__host IsNot Nothing Then
                    Me.__host.RaisePropertyChanged("Room")
                End If
            End Set
        End Property
        
        Private Sub OnInventoryItem_RoomChanged()
            If Me.__host IsNot Nothing Then
                Me.__host.RaisePropertyChanged("Room")
            End If
        End Sub
        
        #Region "IEntityImplementation Members"
        Private __host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost
        
        Private ReadOnly Property __HostImplementation() As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Host
            Get
                Return Me.__host
            End Get
        End Property
        
        Private Sub _Initialize(ByVal host As Global.Microsoft.LightSwitch.Internal.IEntityImplementationHost) Implements Global.Microsoft.LightSwitch.Internal.IEntityImplementation.Initialize
            Me.__host = host
        End Sub
        
        Protected Overrides Sub OnPropertyChanged(ByVal propertyName As String)
            MyBase.OnPropertyChanged(propertyName)
        
            If Not Me.__host Is Nothing Then
                Me.__host.RaisePropertyChanged(propertyName)
            End If
        End Sub
        #End Region
    End Class
    
End Namespace