﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
    <Schema Namespace="ApplicationModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="NewRouteRequestDetails">
          <Key>
            <PropertyRef Name="NewRouteRequestDetailID" />
          </Key>
          <Property Name="NewRouteRequestDetailID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="OfficeLocationID" Type="bigint" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="VerifiedRouteID" Type="bigint" />
          <Property Name="DivisionTypeID" Type="smallint" Nullable="false" />
          <Property Name="ProvinceID" Type="smallint" Nullable="false" />
          <Property Name="RouteOriginPlaceID" Type="bigint" />
          <Property Name="RouteDestinationPlaceID" Type="bigint" />
          <Property Name="RouteDescription" Type="varchar(max)" />
          <Property Name="NationalRouteNumber" Type="varchar" MaxLength="50" />
          <Property Name="BoardRouteNumber" Type="varchar" MaxLength="50" />
          <Property Name="RouteLength" Type="float" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
          <Property Name="NewRouteRequestTypeID" Type="smallint" Nullable="false" />
          <Property Name="TimeTableDocumentID" Type="bigint" />
          <Property Name="FareScheduleDocumentID" Type="bigint" />
          <Property Name="IsAssessorVerificationRequired" Type="bit" Nullable="false" />
          <Property Name="OriginalDescription" Type="varchar(max)" />
          <Property Name="OriginalNationalRouteNumber" Type="varchar" MaxLength="255" />
          <Property Name="OriginalBoardRouteNumber" Type="varchar" MaxLength="255" />
          <Property Name="IsExistingLtpsOrOlasRoute" Type="bit" />
        </EntityType>
        <EntityType Name="NewRouteRequestTypes">
          <Key>
            <PropertyRef Name="NewRouteRequestTypeID" />
          </Key>
          <Property Name="NewRouteRequestTypeID" Type="smallint" Nullable="false" />
          <Property Name="Title" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="NewRouteRouteNodes">
          <Key>
            <PropertyRef Name="NewRouteRouteNodeID" />
          </Key>
          <Property Name="NewRouteRouteNodeID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="NewRouteRequestDetailID" Type="bigint" Nullable="false" />
          <Property Name="PlaceID" Type="bigint" Nullable="false" />
          <Property Name="WaypointTypeID" Type="smallint" Nullable="false" />
          <Property Name="Sequence" Type="int" Nullable="false" />
          <Property Name="DistanceFromOrigin" Type="float" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'LegitimateNATIONAL.App.Vw_ApplicationDetails_Light' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_ApplicationDetails_Light">
          <Key>
            <PropertyRef Name="ApplicationDetailID" />
            
            
            
            
            
            
            
            
            
            
            
            <PropertyRef Name="IsGazettingBypassed" />
            
            
            <PropertyRef Name="IsBusAndContract" />
            
            
            
            
            
            
            
            
            <PropertyRef Name="IsRenewal" />
            <PropertyRef Name="ApplicationIsObjected" />
            <PropertyRef Name="OnlyExistingRoutesOnLicense" />
            <PropertyRef Name="IsAllowedNewLicence" />
            <PropertyRef Name="ForceGazetting" />
            <PropertyRef Name="PREDataReleased" />
          </Key>
          <Property Name="ApplicationDetailID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="DivisionTypeID" Type="smallint" Nullable="false" />
          <Property Name="ProvinceID" Type="smallint" Nullable="false" />
          <Property Name="RegionID" Type="bigint" />
          <Property Name="LicenceCount" Type="int" Nullable="false" />
          <Property Name="ApplicationNumber" Type="varchar" MaxLength="20" />
          <Property Name="ApplicationRequestTypeID" Type="smallint" Nullable="false" />
          <Property Name="RequestType" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="IncludeRenewalType" Type="bit" />
          <Property Name="Member" Type="varchar" MaxLength="511" />
          <Property Name="TelCell" Type="varchar" MaxLength="14" />
          <Property Name="Email" Type="varchar" MaxLength="150" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
          <Property Name="ApplicationDescription" Type="varchar" MaxLength="255" />
          <Property Name="IDNumberOrBusinessRegistrationNo" Type="varchar" MaxLength="20" />
          <Property Name="AdjudicationCount" Type="smallint" />
          <Property Name="AdjudicationOfficeLocationID" Type="smallint" />
          <Property Name="IsReceiptRequired" Type="bit" Nullable="false" />
          <Property Name="IsAdjudicationRequired" Type="bit" Nullable="false" />
          <Property Name="IsAdjustmentRequired" Type="bit" Nullable="false" />
          <Property Name="IsGazettingRequired" Type="bit" Nullable="false" />
          <Property Name="IsGazettingBypassed" Type="bit" Nullable="false" />
          <Property Name="IsInspectionRequired" Type="bit" Nullable="false" />
          <Property Name="IsReferralRequired" Type="bit" Nullable="false" />
          <Property Name="IsBusAndContract" Type="bit" Nullable="false" />
          <Property Name="GazetteDetailID" Type="bigint" />
          <Property Name="IsLtpsConversion" Type="bit" />
          <Property Name="IsAdjudicationBypassed" Type="bit" Nullable="false" />
          <Property Name="WorkflowInstanceReference" Type="varchar" MaxLength="20" Nullable="false" />
          <Property Name="ApplicationStatusID" Type="smallint" Nullable="false" />
          <Property Name="ApplicationSubStatusID" Type="smallint" Nullable="false" />
          <Property Name="LiveryDocumentID" Type="bigint" />
          <Property Name="IsNewRouteRequired" Type="bit" Nullable="false" />
          <Property Name="IsAssessorApprovalRequired" Type="bit" Nullable="false" />
          <Property Name="IsSeniorManagerApprovalRequired" Type="bit" Nullable="false" />
          <Property Name="AdjudicationDetailID" Type="bigint" />
          <Property Name="LastAdjudicationDecisionID" Type="int" Nullable="false" />
          <Property Name="TotalVehicles" Type="int" />
          <Property Name="IDType" Type="varchar" MaxLength="50" />
          <Property Name="IsRenewal" Type="bit" Nullable="false" />
          <Property Name="IsFinalisationTasksRequired" Type="bit" />
          <Property Name="ProxyIDNumber" Type="varchar" MaxLength="20" />
          <Property Name="IsApplicantIndividual" Type="smallint" />
          <Property Name="ApplicationIsObjected" Type="bit" Nullable="false" />
          <Property Name="OnlyExistingRoutesOnLicense" Type="bit" Nullable="false" />
          <Property Name="IsAllowedNewLicence" Type="bit" Nullable="false" />
          <Property Name="ForceGazetting" Type="bit" Nullable="false" />
          <Property Name="AdjudicationTypeID" Type="smallint" />
          <Property Name="PREDataReleased" Type="bit" Nullable="false" />
          <Property Name="CopiedFromApplicationDetailID" Type="bigint" />
          <Property Name="RelatedTATApplicationRequestID" Type="bigint" />
          <Property Name="CreatedDate" Type="nvarchar" MaxLength="100" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'LegitimateNATIONAL.App.Vw_NewRouteRequestDetails' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_NewRouteRequestDetails">
          <Key>
            <PropertyRef Name="NewRouteRequestDetailID" />
            
            
            
            
            
            <PropertyRef Name="DivisionTypeID" />
            <PropertyRef Name="ProvinceID" />
          </Key>
          <Property Name="NewRouteRequestDetailID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="VerifiedRouteID" Type="bigint" />
          <Property Name="RouteOrigin" Type="varchar" MaxLength="255" />
          <Property Name="RouteDestination" Type="varchar" MaxLength="255" />
          <Property Name="RouteDescription" Type="varchar(max)" />
          <Property Name="NationalRouteNumber" Type="varchar" MaxLength="50" />
          <Property Name="BoardRouteNumber" Type="varchar" MaxLength="50" />
          <Property Name="RouteLength" Type="float" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="20" Nullable="false" />
          <Property Name="WorkflowInstanceStatus" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="EntityID" Type="int" Nullable="false" />
          <Property Name="ItemID" Type="bigint" Nullable="false" />
          <Property Name="IsAssessorVerificationRequired" Type="bit" Nullable="false" />
          <Property Name="DivisionTypeID" Type="smallint" Nullable="false" />
          <Property Name="ProvinceID" Type="smallint" Nullable="false" />
        </EntityType>
        <Association Name="FK_NewRouteRequestDetails_NewRouteRequestTypes">
          <End Role="NewRouteRequestTypes" Type="Self.NewRouteRequestTypes" Multiplicity="1" />
          <End Role="NewRouteRequestDetails" Type="Self.NewRouteRequestDetails" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="NewRouteRequestTypes">
              <PropertyRef Name="NewRouteRequestTypeID" />
            </Principal>
            <Dependent Role="NewRouteRequestDetails">
              <PropertyRef Name="NewRouteRequestTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_NewRouteRouteNodes_NewRouteRequestDetails">
          <End Role="NewRouteRequestDetails" Type="Self.NewRouteRequestDetails" Multiplicity="1" />
          <End Role="NewRouteRouteNodes" Type="Self.NewRouteRouteNodes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="NewRouteRequestDetails">
              <PropertyRef Name="NewRouteRequestDetailID" />
            </Principal>
            <Dependent Role="NewRouteRouteNodes">
              <PropertyRef Name="NewRouteRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_Dashboard_NewRouteWorkflowStatusGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="NewRouteRequestDetailID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_NewRouteRequest_ExistingRoutesSearch" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="OriginPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="DestinationPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_NewRouteRequest_RunningRequestSearch" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="OriginPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="DestinationPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_NewRouteRequestApplicationsGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="NewRouteRequestDetailID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_NewRouteRequestCreate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="OriginPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="DestinationPlaceID" Type="bigint" Mode="In" />
          <Parameter Name="VerifiedRouteID" Type="bigint" Mode="In" />
          <Parameter Name="RouteProvinceID" Type="smallint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_NewRouteRequestLicencesGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="NewRouteRequestDetailID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_RouteLinkedLicences" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Verified">
          <Parameter Name="RouteID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <EntityContainer Name="ApplicationModelStoreContainer">
          <EntitySet Name="NewRouteRequestDetails" EntityType="Self.NewRouteRequestDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="NewRouteRequestTypes" EntityType="Self.NewRouteRequestTypes" Schema="App" store:Type="Tables" />
          <EntitySet Name="NewRouteRouteNodes" EntityType="Self.NewRouteRouteNodes" Schema="App" store:Type="Tables" />
          <EntitySet Name="Vw_ApplicationDetails_Light" EntityType="Self.Vw_ApplicationDetails_Light" store:Type="Views" store:Schema="App">
            <DefiningQuery>SELECT 
    [Vw_ApplicationDetails_Light].[ApplicationDetailID] AS [ApplicationDetailID], 
    [Vw_ApplicationDetails_Light].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_ApplicationDetails_Light].[WorkflowTemplateID] AS [WorkflowTemplateID], 
    [Vw_ApplicationDetails_Light].[DivisionTypeID] AS [DivisionTypeID], 
    [Vw_ApplicationDetails_Light].[ProvinceID] AS [ProvinceID], 
    [Vw_ApplicationDetails_Light].[RegionID] AS [RegionID], 
    [Vw_ApplicationDetails_Light].[LicenceCount] AS [LicenceCount], 
    [Vw_ApplicationDetails_Light].[ApplicationNumber] AS [ApplicationNumber], 
    [Vw_ApplicationDetails_Light].[ApplicationRequestTypeID] AS [ApplicationRequestTypeID], 
    [Vw_ApplicationDetails_Light].[RequestType] AS [RequestType], 
    [Vw_ApplicationDetails_Light].[IncludeRenewalType] AS [IncludeRenewalType], 
    [Vw_ApplicationDetails_Light].[Member] AS [Member], 
    [Vw_ApplicationDetails_Light].[TelCell] AS [TelCell], 
    [Vw_ApplicationDetails_Light].[Email] AS [Email], 
    [Vw_ApplicationDetails_Light].[IsCancelled] AS [IsCancelled], 
    [Vw_ApplicationDetails_Light].[ApplicationDescription] AS [ApplicationDescription], 
    [Vw_ApplicationDetails_Light].[IDNumberOrBusinessRegistrationNo] AS [IDNumberOrBusinessRegistrationNo], 
    [Vw_ApplicationDetails_Light].[AdjudicationCount] AS [AdjudicationCount], 
    [Vw_ApplicationDetails_Light].[AdjudicationOfficeLocationID] AS [AdjudicationOfficeLocationID], 
    [Vw_ApplicationDetails_Light].[IsReceiptRequired] AS [IsReceiptRequired], 
    [Vw_ApplicationDetails_Light].[IsAdjudicationRequired] AS [IsAdjudicationRequired], 
    [Vw_ApplicationDetails_Light].[IsAdjustmentRequired] AS [IsAdjustmentRequired], 
    [Vw_ApplicationDetails_Light].[IsGazettingRequired] AS [IsGazettingRequired], 
    [Vw_ApplicationDetails_Light].[IsGazettingBypassed] AS [IsGazettingBypassed], 
    [Vw_ApplicationDetails_Light].[IsInspectionRequired] AS [IsInspectionRequired], 
    [Vw_ApplicationDetails_Light].[IsReferralRequired] AS [IsReferralRequired], 
    [Vw_ApplicationDetails_Light].[IsBusAndContract] AS [IsBusAndContract], 
    [Vw_ApplicationDetails_Light].[GazetteDetailID] AS [GazetteDetailID], 
    [Vw_ApplicationDetails_Light].[IsLtpsConversion] AS [IsLtpsConversion], 
    [Vw_ApplicationDetails_Light].[IsAdjudicationBypassed] AS [IsAdjudicationBypassed], 
    [Vw_ApplicationDetails_Light].[WorkflowInstanceReference] AS [WorkflowInstanceReference], 
    [Vw_ApplicationDetails_Light].[ApplicationStatusID] AS [ApplicationStatusID], 
    [Vw_ApplicationDetails_Light].[ApplicationSubStatusID] AS [ApplicationSubStatusID], 
    [Vw_ApplicationDetails_Light].[LiveryDocumentID] AS [LiveryDocumentID], 
    [Vw_ApplicationDetails_Light].[IsNewRouteRequired] AS [IsNewRouteRequired], 
    [Vw_ApplicationDetails_Light].[IsAssessorApprovalRequired] AS [IsAssessorApprovalRequired], 
    [Vw_ApplicationDetails_Light].[IsSeniorManagerApprovalRequired] AS [IsSeniorManagerApprovalRequired], 
    [Vw_ApplicationDetails_Light].[AdjudicationDetailID] AS [AdjudicationDetailID], 
    [Vw_ApplicationDetails_Light].[LastAdjudicationDecisionID] AS [LastAdjudicationDecisionID], 
    [Vw_ApplicationDetails_Light].[TotalVehicles] AS [TotalVehicles], 
    [Vw_ApplicationDetails_Light].[IDType] AS [IDType], 
    [Vw_ApplicationDetails_Light].[IsRenewal] AS [IsRenewal], 
    [Vw_ApplicationDetails_Light].[IsFinalisationTasksRequired] AS [IsFinalisationTasksRequired], 
    [Vw_ApplicationDetails_Light].[ProxyIDNumber] AS [ProxyIDNumber], 
    [Vw_ApplicationDetails_Light].[IsApplicantIndividual] AS [IsApplicantIndividual], 
    [Vw_ApplicationDetails_Light].[ApplicationIsObjected] AS [ApplicationIsObjected], 
    [Vw_ApplicationDetails_Light].[OnlyExistingRoutesOnLicense] AS [OnlyExistingRoutesOnLicense], 
    [Vw_ApplicationDetails_Light].[IsAllowedNewLicence] AS [IsAllowedNewLicence], 
    [Vw_ApplicationDetails_Light].[ForceGazetting] AS [ForceGazetting], 
    [Vw_ApplicationDetails_Light].[AdjudicationTypeID] AS [AdjudicationTypeID], 
    [Vw_ApplicationDetails_Light].[PREDataReleased] AS [PREDataReleased], 
    [Vw_ApplicationDetails_Light].[CopiedFromApplicationDetailID] AS [CopiedFromApplicationDetailID], 
    [Vw_ApplicationDetails_Light].[RelatedTATApplicationRequestID] AS [RelatedTATApplicationRequestID], 
    [Vw_ApplicationDetails_Light].[CreatedDate] AS [CreatedDate]
    FROM [App].[Vw_ApplicationDetails_Light] AS [Vw_ApplicationDetails_Light]</DefiningQuery>
          </EntitySet>
          <EntitySet Name="Vw_NewRouteRequestDetails" EntityType="Self.Vw_NewRouteRequestDetails" store:Type="Views" store:Schema="App">
            <DefiningQuery>SELECT 
    [Vw_NewRouteRequestDetails].[NewRouteRequestDetailID] AS [NewRouteRequestDetailID], 
    [Vw_NewRouteRequestDetails].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_NewRouteRequestDetails].[VerifiedRouteID] AS [VerifiedRouteID], 
    [Vw_NewRouteRequestDetails].[RouteOrigin] AS [RouteOrigin], 
    [Vw_NewRouteRequestDetails].[RouteDestination] AS [RouteDestination], 
    [Vw_NewRouteRequestDetails].[RouteDescription] AS [RouteDescription], 
    [Vw_NewRouteRequestDetails].[NationalRouteNumber] AS [NationalRouteNumber], 
    [Vw_NewRouteRequestDetails].[BoardRouteNumber] AS [BoardRouteNumber], 
    [Vw_NewRouteRequestDetails].[RouteLength] AS [RouteLength], 
    [Vw_NewRouteRequestDetails].[ReferenceNumber] AS [ReferenceNumber], 
    [Vw_NewRouteRequestDetails].[WorkflowInstanceStatus] AS [WorkflowInstanceStatus], 
    [Vw_NewRouteRequestDetails].[EntityID] AS [EntityID], 
    [Vw_NewRouteRequestDetails].[ItemID] AS [ItemID], 
    [Vw_NewRouteRequestDetails].[IsAssessorVerificationRequired] AS [IsAssessorVerificationRequired], 
    [Vw_NewRouteRequestDetails].[DivisionTypeID] AS [DivisionTypeID], 
    [Vw_NewRouteRequestDetails].[ProvinceID] AS [ProvinceID]
    FROM [App].[Vw_NewRouteRequestDetails] AS [Vw_NewRouteRequestDetails]</DefiningQuery>
          </EntitySet>
          <AssociationSet Name="FK_NewRouteRequestDetails_NewRouteRequestTypes" Association="Self.FK_NewRouteRequestDetails_NewRouteRequestTypes">
            <End Role="NewRouteRequestTypes" EntitySet="NewRouteRequestTypes" />
            <End Role="NewRouteRequestDetails" EntitySet="NewRouteRequestDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_NewRouteRouteNodes_NewRouteRequestDetails" Association="Self.FK_NewRouteRouteNodes_NewRouteRequestDetails">
            <End Role="NewRouteRequestDetails" EntitySet="NewRouteRequestDetails" />
            <End Role="NewRouteRouteNodes" EntitySet="NewRouteRouteNodes" />
          </AssociationSet>
        </EntityContainer>
      </Schema></edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Model" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityContainer Name="NewRouteContext" annotation:LazyLoadingEnabled="false">
          <EntitySet Name="NewRouteRequestDetails" EntityType="Model.NewRouteRequestDetail" />
          <EntitySet Name="NewRouteRequestTypes" EntityType="Model.NewRouteRequestType" />
          <EntitySet Name="NewRouteRouteNodes" EntityType="Model.NewRouteRouteNode" />
          <AssociationSet Name="FK_NewRouteRequestDetails_NewRouteRequestTypes" Association="Model.FK_NewRouteRequestDetails_NewRouteRequestTypes">
            <End Role="NewRouteRequestType" EntitySet="NewRouteRequestTypes" />
            <End Role="NewRouteRequestDetail" EntitySet="NewRouteRequestDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_NewRouteRouteNodes_NewRouteRequestDetails" Association="Model.FK_NewRouteRouteNodes_NewRouteRequestDetails">
            <End Role="NewRouteRequestDetail" EntitySet="NewRouteRequestDetails" />
            <End Role="NewRouteRouteNode" EntitySet="NewRouteRouteNodes" />
          </AssociationSet>
          <EntitySet Name="Vw_ApplicationDetails_Light" EntityType="Model.Vw_ApplicationDetails_Light" />
          <FunctionImport Name="Pr_RouteLinkedLicences" ReturnType="Collection(Model.Pr_RouteLinkedLicences_Result)">
            <Parameter Name="RouteID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <EntitySet Name="Vw_NewRouteRequestDetails" EntityType="Model.Vw_NewRouteRequestDetail" />
          <FunctionImport Name="Pr_NewRouteRequest_ExistingRoutesSearch" ReturnType="Collection(Model.Pr_NewRouteRequest_ExistingRoutesSearch_Result)">
            <Parameter Name="OriginPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="DestinationPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_NewRouteRequest_RunningRequestSearch" ReturnType="Collection(Model.Pr_NewRouteRequest_RunningRequestSearch_Result)">
            <Parameter Name="OriginPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="DestinationPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_NewRouteRequestCreate" EntitySet="Vw_NewRouteRequestDetails" ReturnType="Collection(Model.Vw_NewRouteRequestDetail)">
            <Parameter Name="OriginPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="DestinationPlaceID" Mode="In" Type="Int64" />
            <Parameter Name="VerifiedRouteID" Mode="In" Type="Int64" />
            <Parameter Name="RouteProvinceID" Mode="In" Type="Int16" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_Dashboard_NewRouteWorkflowStatusGet" ReturnType="Collection(Model.Pr_Dashboard_NewRouteWorkflowStatusGet_Result)">
            <Parameter Name="NewRouteRequestDetailID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_NewRouteRequestApplicationsGet" ReturnType="Collection(Model.Pr_NewRouteRequestApplicationsGet_Result)">
            <Parameter Name="NewRouteRequestDetailID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_NewRouteRequestLicencesGet" ReturnType="Collection(Model.Pr_NewRouteRequestLicencesGet_Result)">
            <Parameter Name="NewRouteRequestDetailID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          </EntityContainer>
        <EntityType Name="NewRouteRequestDetail">
          <Key>
            <PropertyRef Name="NewRouteRequestDetailID" />
          </Key>
          <Property Name="NewRouteRequestDetailID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowInstanceID" Type="Int64" />
          <Property Name="VerifiedRouteID" Type="Int64" />
          <Property Name="RouteOriginPlaceID" Type="Int64" />
          <Property Name="RouteDestinationPlaceID" Type="Int64" />
          <Property Name="RouteDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Name="NationalRouteNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="BoardRouteNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="RouteLength" Type="Double" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <Property Name="NewRouteRequestTypeID" Type="Int16" Nullable="false" />
          <Property Name="TimeTableDocumentID" Type="Int64" />
          <Property Name="FareScheduleDocumentID" Type="Int64" />
          <Property Name="IsAssessorVerificationRequired" Type="Boolean" Nullable="false" />
          <Property Name="OriginalDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Name="OriginalNationalRouteNumber" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="OriginalBoardRouteNumber" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="IsExistingLtpsOrOlasRoute" Type="Boolean" />
          <NavigationProperty Name="NewRouteRequestType" Relationship="Model.FK_NewRouteRequestDetails_NewRouteRequestTypes" FromRole="NewRouteRequestDetail" ToRole="NewRouteRequestType" />
          <NavigationProperty Name="Nodes" Relationship="Model.FK_NewRouteRouteNodes_NewRouteRequestDetails" FromRole="NewRouteRequestDetail" ToRole="NewRouteRouteNode" />
          <Property Name="DivisionTypeID" Type="Int16" Nullable="false" />
          <Property Name="ProvinceID" Type="Int16" Nullable="false" />
          <Property Name="OfficeLocationID" Type="Int64" />
        </EntityType>
        <EntityType Name="NewRouteRequestType">
          <Key>
            <PropertyRef Name="NewRouteRequestTypeID" />
          </Key>
          <Property Name="NewRouteRequestTypeID" Type="Int16" Nullable="false" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="NewRouteRequestDetails" Relationship="Model.FK_NewRouteRequestDetails_NewRouteRequestTypes" FromRole="NewRouteRequestType" ToRole="NewRouteRequestDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="NewRouteRouteNode">
          <Key>
            <PropertyRef Name="NewRouteRouteNodeID" />
          </Key>
          <Property Name="NewRouteRouteNodeID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="NewRouteRequestDetailID" Type="Int64" Nullable="false" />
          <Property Name="PlaceID" Type="Int64" Nullable="false" />
          <Property Name="WaypointTypeID" Type="Int16" Nullable="false" />
          <Property Name="Sequence" Type="Int32" Nullable="false" />
          <Property Name="DistanceFromOrigin" Type="Double" />
          <NavigationProperty Name="NewRouteRequestDetail" Relationship="Model.FK_NewRouteRouteNodes_NewRouteRequestDetails" FromRole="NewRouteRouteNode" ToRole="NewRouteRequestDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_NewRouteRequestDetails_NewRouteRequestTypes">
          <End Type="Model.NewRouteRequestType" Role="NewRouteRequestType" Multiplicity="1" />
          <End Type="Model.NewRouteRequestDetail" Role="NewRouteRequestDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="NewRouteRequestType">
              <PropertyRef Name="NewRouteRequestTypeID" />
            </Principal>
            <Dependent Role="NewRouteRequestDetail">
              <PropertyRef Name="NewRouteRequestTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_NewRouteRouteNodes_NewRouteRequestDetails">
          <End Type="Model.NewRouteRequestDetail" Role="NewRouteRequestDetail" Multiplicity="1" />
          <End Type="Model.NewRouteRouteNode" Role="NewRouteRouteNode" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="NewRouteRequestDetail">
              <PropertyRef Name="NewRouteRequestDetailID" />
            </Principal>
            <Dependent Role="NewRouteRouteNode">
              <PropertyRef Name="NewRouteRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Vw_ApplicationDetails_Light">
          <Key>
            <PropertyRef Name="ApplicationDetailID" />
            <PropertyRef Name="IsRenewal" />
            <PropertyRef Name="IsGazettingBypassed" />
            <PropertyRef Name="IsBusAndContract" />
            <PropertyRef Name="ApplicationIsObjected" />
            <PropertyRef Name="OnlyExistingRoutesOnLicense" />
            <PropertyRef Name="IsAllowedNewLicence" />
            <PropertyRef Name="ForceGazetting" />
            <PropertyRef Name="PREDataReleased" />
          </Key>
          <Property Name="ApplicationDetailID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="Int64" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" />
          <Property Name="DivisionTypeID" Type="Int16" Nullable="false" />
          <Property Name="ProvinceID" Type="Int16" Nullable="false" />
          <Property Name="RegionID" Type="Int64" />
          <Property Name="ApplicationNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="ApplicationRequestTypeID" Type="Int16" Nullable="false" />
          <Property Name="RequestType" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="Member" Type="String" MaxLength="511" FixedLength="false" Unicode="false" />
          <Property Name="TelCell" Type="String" MaxLength="14" FixedLength="false" Unicode="false" />
          <Property Name="Email" Type="String" MaxLength="150" FixedLength="false" Unicode="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <Property Name="ApplicationDescription" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="IDNumberOrBusinessRegistrationNo" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="AdjudicationCount" Type="Int16" />
          <Property Name="IsReceiptRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsAdjudicationRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsAdjustmentRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsGazettingRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsInspectionRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsReferralRequired" Type="Boolean" Nullable="false" />
          <Property Name="GazetteDetailID" Type="Int64" />
          <Property Name="AdjudicationDetailID" Type="Int64" />
          <Property Name="IsLtpsConversion" Type="Boolean" />
          <Property Name="IsAdjudicationBypassed" Type="Boolean" Nullable="false" />
          <Property Name="WorkflowInstanceReference" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="ApplicationStatusID" Type="Int16" Nullable="false" />
          <Property Name="ApplicationSubStatusID" Type="Int16" Nullable="false" />
          <Property Name="LiveryDocumentID" Type="Int64" />
          <Property Name="LastAdjudicationDecisionID" Type="Int16" Nullable="false" />
          <Property Name="LicenceCount" Type="Int32" Nullable="false" />
          <Property Name="IsNewRouteRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsAssessorApprovalRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsSeniorManagerApprovalRequired" Type="Boolean" Nullable="false" />
          <Property Name="AdjudicationOfficeLocationID" Type="Int16" />
          <Property Name="TotalVehicles" Type="Int32" />
          <Property Name="IDType" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="IsRenewal" Type="Boolean" Nullable="false" />
          <Property Name="IsFinalisationTasksRequired" Type="Boolean" />
          <Property Name="IncludeRenewalType" Type="Boolean" />
          <Property Name="IsGazettingBypassed" Type="Boolean" Nullable="false" />
          <Property Name="IsBusAndContract" Type="Boolean" Nullable="false" />
          <Property Name="ProxyIDNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="IsApplicantIndividual" Type="Int16" />
          <Property Name="ApplicationIsObjected" Type="Boolean" Nullable="false" />
          <Property Name="OnlyExistingRoutesOnLicense" Type="Boolean" Nullable="false" />
          <Property Name="IsAllowedNewLicence" Type="Boolean" Nullable="false" />
          <Property Name="ForceGazetting" Type="Boolean" Nullable="false" />
          <Property Name="AdjudicationTypeID" Type="Int16" />
          <Property Name="PREDataReleased" Type="Boolean" Nullable="false" />
          <Property Name="CopiedFromApplicationDetailID" Type="Int64" />
          <Property Name="RelatedTATApplicationRequestID" Type="Int64" />
          <Property Name="CreatedDate" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
        </EntityType>
        <ComplexType Name="Pr_RouteLinkedLicences_Result">
          <Property Type="Int64" Name="LicenceID" Nullable="false" />
          <Property Type="String" Name="OperatingLicenceNumber" Nullable="true" MaxLength="18" />
          <Property Type="String" Name="AssociationName" Nullable="false" MaxLength="255" />
          <Property Type="String" Name="NameOnLicence" Nullable="true" MaxLength="100" />
          <Property Type="String" Name="LicenceStatus" Nullable="false" MaxLength="50" />
        </ComplexType>
        <EntityType Name="Vw_NewRouteRequestDetail">
          <Key>
            <PropertyRef Name="NewRouteRequestDetailID" />
            <PropertyRef Name="DivisionTypeID" />
            <PropertyRef Name="ProvinceID" />
          </Key>
          <Property Name="NewRouteRequestDetailID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="Int64" />
          <Property Name="VerifiedRouteID" Type="Int64" />
          <Property Name="RouteOrigin" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="RouteDestination" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="RouteDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Name="NationalRouteNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="BoardRouteNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="RouteLength" Type="Double" />
          <Property Name="ReferenceNumber" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowInstanceStatus" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="EntityID" Type="Int32" Nullable="false" />
          <Property Name="ItemID" Type="Int64" Nullable="false" />
          <Property Name="IsAssessorVerificationRequired" Type="Boolean" Nullable="false" />
          <Property Name="DivisionTypeID" Type="Int16" Nullable="false" />
          <Property Name="ProvinceID" Type="Int16" Nullable="false" />
        </EntityType>
        <ComplexType Name="Pr_NewRouteRequest_ExistingRoutesSearch_Result">
          <Property Type="Int64" Name="RouteID" Nullable="false" />
          <Property Type="String" Name="ReferenceNumber" Nullable="true" MaxLength="53" />
          <Property Type="Int16" Name="RouteTypeID" Nullable="false" />
          <Property Type="String" Name="RouteName" Nullable="false" MaxLength="500" />
          <Property Type="String" Name="Description" Nullable="false" />
          <Property Type="Int64" Name="OriginPlaceID" Nullable="true" />
          <Property Type="Int64" Name="DestinationPlaceID" Nullable="true" />
          <Property Type="String" Name="NationalRouteNumber" Nullable="true" MaxLength="100" />
          <Property Type="String" Name="BoardRouteNumber" Nullable="true" MaxLength="100" />
          <Property Type="Double" Name="RouteLength" Nullable="true" />
          <Property Type="Int16" Name="RouteStatusID" Nullable="false" />
          <Property Type="Int64" Name="OlasID" Nullable="true" />
          <Property Type="Int64" Name="LtpsID" Nullable="true" />
          <Property Type="Int64" Name="NeoID" Nullable="true" />
          <Property Type="Int64" Name="ProvinceID" Nullable="true" />
          <Property Type="Int64" Name="TimeTableDocumentID" Nullable="true" />
          <Property Type="Int64" Name="FareScheduleDocumentID" Nullable="true" />
          <Property Type="Boolean" Name="IsChecked" Nullable="false" />
          <Property Type="Boolean" Name="IsPotentialIncorrectRouteChange" Nullable="false" />
          <Property Type="Int16" Name="IsPotentialIncorrectRouteChangeProbability" Nullable="true" />
        </ComplexType>
        <ComplexType Name="Pr_NewRouteRequest_RunningRequestSearch_Result">
          <Property Type="String" Name="ReferenceNumber" Nullable="false" MaxLength="10" />
          <Property Type="DateTime" Name="StartDate" Nullable="false" Precision="23" />
          <Property Type="String" Name="RouteDescription" Nullable="false" />
        </ComplexType>
        <ComplexType Name="Pr_Dashboard_NewRouteWorkflowStatusGet_Result">
          <Property Type="String" Name="Title" Nullable="true" MaxLength="255" />
          <Property Type="String" Name="Status" Nullable="true" MaxLength="50" />
          <Property Type="String" Name="StatusDetail" Nullable="true" MaxLength="2000" />
          <Property Type="Int32" Name="OrderBy" Nullable="true" />
        </ComplexType>
        <ComplexType Name="Pr_NewRouteRequestApplicationsGet_Result">
          <Property Type="String" Name="ApplicationLicenceReferenceNumber" Nullable="true" MaxLength="20" />
          <Property Type="String" Name="ApplicationDescription" Nullable="true" MaxLength="255" />
          <Property Type="String" Name="CreatedDate" Nullable="true" MaxLength="100" />
        </ComplexType>
        <ComplexType Name="Pr_NewRouteRequestLicencesGet_Result">
          <Property Type="String" Name="OperatingLicenceNumber" Nullable="true" MaxLength="20" />
          <Property Type="String" Name="DateOfIssue" Nullable="true" MaxLength="100" />
          <Property Type="String" Name="DateOfExpiry" Nullable="true" MaxLength="100" />
        </ComplexType>
        </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="ApplicationModelStoreContainer" CdmEntityContainer="NewRouteContext">
          <EntitySetMapping Name="NewRouteRequestDetails">
            <EntityTypeMapping TypeName="Model.NewRouteRequestDetail">
              <MappingFragment StoreEntitySet="NewRouteRequestDetails">
                <ScalarProperty Name="OfficeLocationID" ColumnName="OfficeLocationID" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="DivisionTypeID" ColumnName="DivisionTypeID" />
                <ScalarProperty Name="IsExistingLtpsOrOlasRoute" ColumnName="IsExistingLtpsOrOlasRoute" />
                <ScalarProperty Name="OriginalBoardRouteNumber" ColumnName="OriginalBoardRouteNumber" />
                <ScalarProperty Name="OriginalNationalRouteNumber" ColumnName="OriginalNationalRouteNumber" />
                <ScalarProperty Name="OriginalDescription" ColumnName="OriginalDescription" />
                <ScalarProperty Name="IsAssessorVerificationRequired" ColumnName="IsAssessorVerificationRequired" />
                <ScalarProperty Name="FareScheduleDocumentID" ColumnName="FareScheduleDocumentID" />
                <ScalarProperty Name="TimeTableDocumentID" ColumnName="TimeTableDocumentID" />
                <ScalarProperty Name="NewRouteRequestTypeID" ColumnName="NewRouteRequestTypeID" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="RouteLength" ColumnName="RouteLength" />
                <ScalarProperty Name="BoardRouteNumber" ColumnName="BoardRouteNumber" />
                <ScalarProperty Name="NationalRouteNumber" ColumnName="NationalRouteNumber" />
                <ScalarProperty Name="RouteDescription" ColumnName="RouteDescription" />
                <ScalarProperty Name="RouteDestinationPlaceID" ColumnName="RouteDestinationPlaceID" />
                <ScalarProperty Name="RouteOriginPlaceID" ColumnName="RouteOriginPlaceID" />
                <ScalarProperty Name="VerifiedRouteID" ColumnName="VerifiedRouteID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="NewRouteRequestDetailID" ColumnName="NewRouteRequestDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="NewRouteRequestTypes">
            <EntityTypeMapping TypeName="Model.NewRouteRequestType">
              <MappingFragment StoreEntitySet="NewRouteRequestTypes">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="NewRouteRequestTypeID" ColumnName="NewRouteRequestTypeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="NewRouteRouteNodes">
            <EntityTypeMapping TypeName="Model.NewRouteRouteNode">
              <MappingFragment StoreEntitySet="NewRouteRouteNodes">
                <ScalarProperty Name="DistanceFromOrigin" ColumnName="DistanceFromOrigin" />
                <ScalarProperty Name="Sequence" ColumnName="Sequence" />
                <ScalarProperty Name="WaypointTypeID" ColumnName="WaypointTypeID" />
                <ScalarProperty Name="PlaceID" ColumnName="PlaceID" />
                <ScalarProperty Name="NewRouteRequestDetailID" ColumnName="NewRouteRequestDetailID" />
                <ScalarProperty Name="NewRouteRouteNodeID" ColumnName="NewRouteRouteNodeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vw_ApplicationDetails_Light">
            <EntityTypeMapping TypeName="Model.Vw_ApplicationDetails_Light">
              <MappingFragment StoreEntitySet="Vw_ApplicationDetails_Light">
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="RelatedTATApplicationRequestID" ColumnName="RelatedTATApplicationRequestID" />
                <ScalarProperty Name="CopiedFromApplicationDetailID" ColumnName="CopiedFromApplicationDetailID" />
                <ScalarProperty Name="PREDataReleased" ColumnName="PREDataReleased" />
                <ScalarProperty Name="AdjudicationTypeID" ColumnName="AdjudicationTypeID" />
                <ScalarProperty Name="ForceGazetting" ColumnName="ForceGazetting" />
                <ScalarProperty Name="IsAllowedNewLicence" ColumnName="IsAllowedNewLicence" />
                <ScalarProperty Name="OnlyExistingRoutesOnLicense" ColumnName="OnlyExistingRoutesOnLicense" />
                <ScalarProperty Name="ApplicationIsObjected" ColumnName="ApplicationIsObjected" />
                <ScalarProperty Name="IsApplicantIndividual" ColumnName="IsApplicantIndividual" />
                <ScalarProperty Name="ProxyIDNumber" ColumnName="ProxyIDNumber" />
                <ScalarProperty Name="IsBusAndContract" ColumnName="IsBusAndContract" />
                <ScalarProperty Name="IsGazettingBypassed" ColumnName="IsGazettingBypassed" />
                <ScalarProperty Name="IncludeRenewalType" ColumnName="IncludeRenewalType" />
                <ScalarProperty Name="IsFinalisationTasksRequired" ColumnName="IsFinalisationTasksRequired" />
                <ScalarProperty Name="IsRenewal" ColumnName="IsRenewal" />
                <ScalarProperty Name="IDType" ColumnName="IDType" />
                <ScalarProperty Name="TotalVehicles" ColumnName="TotalVehicles" />
                <ScalarProperty Name="AdjudicationOfficeLocationID" ColumnName="AdjudicationOfficeLocationID" />
                <ScalarProperty Name="AdjudicationDetailID" ColumnName="AdjudicationDetailID" />
                <ScalarProperty Name="IsSeniorManagerApprovalRequired" ColumnName="IsSeniorManagerApprovalRequired" />
                <ScalarProperty Name="IsAssessorApprovalRequired" ColumnName="IsAssessorApprovalRequired" />
                <ScalarProperty Name="IsNewRouteRequired" ColumnName="IsNewRouteRequired" />
                <ScalarProperty Name="LicenceCount" ColumnName="LicenceCount" />
                <ScalarProperty Name="LastAdjudicationDecisionID" ColumnName="LastAdjudicationDecisionID" />
                <ScalarProperty Name="LiveryDocumentID" ColumnName="LiveryDocumentID" />
                <ScalarProperty Name="ApplicationSubStatusID" ColumnName="ApplicationSubStatusID" />
                <ScalarProperty Name="ApplicationStatusID" ColumnName="ApplicationStatusID" />
                <ScalarProperty Name="WorkflowInstanceReference" ColumnName="WorkflowInstanceReference" />
                <ScalarProperty Name="IsAdjudicationBypassed" ColumnName="IsAdjudicationBypassed" />
                <ScalarProperty Name="IsLtpsConversion" ColumnName="IsLtpsConversion" />
                <ScalarProperty Name="GazetteDetailID" ColumnName="GazetteDetailID" />
                <ScalarProperty Name="IsReferralRequired" ColumnName="IsReferralRequired" />
                <ScalarProperty Name="IsInspectionRequired" ColumnName="IsInspectionRequired" />
                <ScalarProperty Name="IsGazettingRequired" ColumnName="IsGazettingRequired" />
                <ScalarProperty Name="IsAdjustmentRequired" ColumnName="IsAdjustmentRequired" />
                <ScalarProperty Name="IsAdjudicationRequired" ColumnName="IsAdjudicationRequired" />
                <ScalarProperty Name="IsReceiptRequired" ColumnName="IsReceiptRequired" />
                <ScalarProperty Name="AdjudicationCount" ColumnName="AdjudicationCount" />
                <ScalarProperty Name="IDNumberOrBusinessRegistrationNo" ColumnName="IDNumberOrBusinessRegistrationNo" />
                <ScalarProperty Name="ApplicationDescription" ColumnName="ApplicationDescription" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Email" ColumnName="Email" />
                <ScalarProperty Name="TelCell" ColumnName="TelCell" />
                <ScalarProperty Name="Member" ColumnName="Member" />
                <ScalarProperty Name="RequestType" ColumnName="RequestType" />
                <ScalarProperty Name="ApplicationRequestTypeID" ColumnName="ApplicationRequestTypeID" />
                <ScalarProperty Name="ApplicationNumber" ColumnName="ApplicationNumber" />
                <ScalarProperty Name="RegionID" ColumnName="RegionID" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="DivisionTypeID" ColumnName="DivisionTypeID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="ApplicationDetailID" ColumnName="ApplicationDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_RouteLinkedLicences" FunctionName="ApplicationModel.Store.Pr_RouteLinkedLicences">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_RouteLinkedLicences_Result">
                <ScalarProperty Name="LicenceID" ColumnName="LicenceID" />
                <ScalarProperty Name="OperatingLicenceNumber" ColumnName="OperatingLicenceNumber" />
                <ScalarProperty Name="AssociationName" ColumnName="AssociationName" />
                <ScalarProperty Name="NameOnLicence" ColumnName="NameOnLicence" />
                <ScalarProperty Name="LicenceStatus" ColumnName="LicenceStatus" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <EntitySetMapping Name="Vw_NewRouteRequestDetails">
            <EntityTypeMapping TypeName="Model.Vw_NewRouteRequestDetail">
              <MappingFragment StoreEntitySet="Vw_NewRouteRequestDetails">
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="DivisionTypeID" ColumnName="DivisionTypeID" />
                <ScalarProperty Name="IsAssessorVerificationRequired" ColumnName="IsAssessorVerificationRequired" />
                <ScalarProperty Name="ItemID" ColumnName="ItemID" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
                <ScalarProperty Name="WorkflowInstanceStatus" ColumnName="WorkflowInstanceStatus" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="RouteLength" ColumnName="RouteLength" />
                <ScalarProperty Name="BoardRouteNumber" ColumnName="BoardRouteNumber" />
                <ScalarProperty Name="NationalRouteNumber" ColumnName="NationalRouteNumber" />
                <ScalarProperty Name="RouteDescription" ColumnName="RouteDescription" />
                <ScalarProperty Name="RouteDestination" ColumnName="RouteDestination" />
                <ScalarProperty Name="RouteOrigin" ColumnName="RouteOrigin" />
                <ScalarProperty Name="VerifiedRouteID" ColumnName="VerifiedRouteID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="NewRouteRequestDetailID" ColumnName="NewRouteRequestDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_NewRouteRequest_ExistingRoutesSearch" FunctionName="ApplicationModel.Store.Pr_NewRouteRequest_ExistingRoutesSearch">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_NewRouteRequest_ExistingRoutesSearch_Result">
                <ScalarProperty Name="RouteID" ColumnName="RouteID" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="RouteTypeID" ColumnName="RouteTypeID" />
                <ScalarProperty Name="RouteName" ColumnName="RouteName" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="OriginPlaceID" ColumnName="OriginPlaceID" />
                <ScalarProperty Name="DestinationPlaceID" ColumnName="DestinationPlaceID" />
                <ScalarProperty Name="NationalRouteNumber" ColumnName="NationalRouteNumber" />
                <ScalarProperty Name="BoardRouteNumber" ColumnName="BoardRouteNumber" />
                <ScalarProperty Name="RouteLength" ColumnName="RouteLength" />
                <ScalarProperty Name="RouteStatusID" ColumnName="RouteStatusID" />
                <ScalarProperty Name="OlasID" ColumnName="OlasID" />
                <ScalarProperty Name="LtpsID" ColumnName="LtpsID" />
                <ScalarProperty Name="NeoID" ColumnName="NeoID" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="TimeTableDocumentID" ColumnName="TimeTableDocumentID" />
                <ScalarProperty Name="FareScheduleDocumentID" ColumnName="FareScheduleDocumentID" />
                <ScalarProperty Name="IsChecked" ColumnName="IsChecked" />
                <ScalarProperty Name="IsPotentialIncorrectRouteChange" ColumnName="IsPotentialIncorrectRouteChange" />
                <ScalarProperty Name="IsPotentialIncorrectRouteChangeProbability" ColumnName="IsPotentialIncorrectRouteChangeProbability" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_NewRouteRequest_RunningRequestSearch" FunctionName="ApplicationModel.Store.Pr_NewRouteRequest_RunningRequestSearch">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_NewRouteRequest_RunningRequestSearch_Result">
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="StartDate" ColumnName="StartDate" />
                <ScalarProperty Name="RouteDescription" ColumnName="RouteDescription" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_NewRouteRequestCreate" FunctionName="ApplicationModel.Store.Pr_NewRouteRequestCreate" />
          <FunctionImportMapping FunctionImportName="Pr_Dashboard_NewRouteWorkflowStatusGet" FunctionName="ApplicationModel.Store.Pr_Dashboard_NewRouteWorkflowStatusGet">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_Dashboard_NewRouteWorkflowStatusGet_Result">
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="Status" ColumnName="Status" />
                <ScalarProperty Name="StatusDetail" ColumnName="StatusDetail" />
                <ScalarProperty Name="OrderBy" ColumnName="OrderBy" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_NewRouteRequestApplicationsGet" FunctionName="ApplicationModel.Store.Pr_NewRouteRequestApplicationsGet">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_NewRouteRequestApplicationsGet_Result">
                <ScalarProperty Name="ApplicationLicenceReferenceNumber" ColumnName="ApplicationLicenceReferenceNumber" />
                <ScalarProperty Name="ApplicationDescription" ColumnName="ApplicationDescription" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_NewRouteRequestLicencesGet" FunctionName="ApplicationModel.Store.Pr_NewRouteRequestLicencesGet">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_NewRouteRequestLicencesGet_Result">
                <ScalarProperty Name="OperatingLicenceNumber" ColumnName="OperatingLicenceNumber" />
                <ScalarProperty Name="DateOfIssue" ColumnName="DateOfIssue" />
                <ScalarProperty Name="DateOfExpiry" ColumnName="DateOfExpiry" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="True" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="None" />
        <DesignerProperty Name="UseLegacyProvider" Value="False" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams>
      <Diagram DiagramId="79bbfdb8b482480ca14f44acbc0e404d" Name="Accreditation Issue Details" ZoomLevel="73" >
        <EntityTypeShape EntityType="Model.NewRouteRequestDetail" Width="3.25" PointX="3" PointY="1.125" />
        <EntityTypeShape EntityType="Model.NewRouteRequestType" Width="1.5" PointX="0.75" PointY="3.25" />
        <EntityTypeShape EntityType="Model.NewRouteRouteNode" Width="2.75" PointX="8.125" PointY="3.125" />
        <AssociationConnector Association="Model.FK_NewRouteRequestDetails_NewRouteRequestTypes" />
        <AssociationConnector Association="Model.FK_NewRouteRouteNodes_NewRouteRequestDetails" />
        <EntityTypeShape EntityType="Model.Vw_ApplicationDetails_Light" Width="4.25" PointX="7.375" PointY="6.75" />
      </Diagram>
      <Diagram DiagramId="d9775f7ebe1541f4af4eaf464e347443" Name="Views" >
        <EntityTypeShape EntityType="Model.Vw_ApplicationDetails_Light" Width="1.5" PointX="0.75" PointY="0.75" />
        <EntityTypeShape EntityType="Model.Vw_NewRouteRequestDetail" Width="1.5" PointX="3.375" PointY="0.75" />
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>