﻿<?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="LicenceIssueModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" 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="ApplicationRequestDetails">
          <Key>
            <PropertyRef Name="ApplicationRequestDetailID" />
          </Key>
          <Property Name="ApplicationRequestDetailID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="ApplicationRequestTypeID" Type="smallint" Nullable="false" />
          <Property Name="SourceApplicationID" Type="smallint" Nullable="false" />
          <Property Name="ProvinceID" Type="smallint" Nullable="false" />
          <Property Name="GazetteDetailID" Type="bigint" />
          <Property Name="AdjudicationDetailID" Type="bigint" />
          <Property Name="PrecheckDetailID" Type="bigint" />
          <Property Name="PaymentTypeID" Type="smallint" />
          <Property Name="IsRenewal" Type="bit" Nullable="false" />
          <Property Name="IsLateRenewal" Type="bit" Nullable="false" />
          <Property Name="IsNewAssociationRequired" Type="bit" Nullable="false" />
          <Property Name="IsNewMemberRequired" Type="bit" Nullable="false" />
          <Property Name="IsNewRouteRequired" Type="bit" Nullable="false" />
          <Property Name="IsExceptionRequired" Type="bit" Nullable="false" />
          <Property Name="IsUpliftmentRequired" Type="bit" Nullable="false" />
          <Property Name="IsAdjustmentRequired" Type="bit" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="500" />
          <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="IsCancellationRequired" Type="bit" Nullable="false" />
          <Property Name="RegionID" Type="bigint" />
          <Property Name="AdjudicationDecisionID" Type="smallint" />
          <Property Name="AdjudicationLicenceDurationMonths" Type="int" />
          <Property Name="AdjudicationDecisionDate" Type="datetime" />
          <Property Name="AdjudicationException" Type="bit" />
          <Property Name="AdjudicationLicenceExpiryDate" Type="date" />
          <Property Name="IsAdjudicationBypassed" Type="bit" Nullable="false" />
          <Property Name="AdjudicationRegionID" Type="smallint" />
          <Property Name="IsGazettingBypassed" Type="bit" Nullable="false" />
          <Property Name="IsAssessorApprovalRequired" Type="bit" Nullable="false" />
          <Property Name="IsSeniorManagerApprovalRequired" Type="bit" Nullable="false" />
          <Property Name="HasNewRoute" Type="bit" Nullable="false" />
          <Property Name="IsAutoVerificationRequired" Type="bit" />
          <Property Name="IsLtpsConversion" Type="bit" />
          <Property Name="IsBulkVehicleApplication" Type="bit" Nullable="false" />
          <Property Name="VehicleCount" Type="int" Nullable="false" />
          <Property Name="IsBulkVehicleVerificationRequired" Type="bit" />
          <Property Name="AdjudicationCount" Type="int" />
        </EntityType>
        <EntityType Name="ApplicationVehicleDetails">
          <Key>
            <PropertyRef Name="ApplicationRequestDetailID" />
          </Key>
          <Property Name="ApplicationRequestDetailID" Type="bigint" Nullable="false" />
          <Property Name="IsStillToBeAcquired" Type="bit" Nullable="false" />
          <Property Name="VehicleMakeID" Type="smallint" />
          <Property Name="VehicleMakeDescription" Type="varchar" MaxLength="100" />
          <Property Name="VehicleTypeID" Type="smallint" />
          <Property Name="VIN" Type="varchar" MaxLength="50" />
          <Property Name="EngineNumber" Type="varchar" MaxLength="50" />
          <Property Name="YearOfManufacture" Type="varchar" MaxLength="4" />
          <Property Name="VehicleRegistrationNumber" Type="varchar" MaxLength="50" />
          <Property Name="SeatedCapacity" Type="smallint" />
          <Property Name="StandingCapacity" Type="smallint" />
          <Property Name="RoadworthyCertificateNumber" Type="varchar" MaxLength="20" />
          <Property Name="RoadworthyCertificateDocID" Type="bigint" />
          <Property Name="RoadworthyExpiryDate" Type="datetime" />
          <Property Name="GrossMass" Type="bigint" />
          <Property Name="VerifiedVehicleID" Type="bigint" />
          <Property Name="CarryingCapacityID" Type="bigint" />
        </EntityType>
        <EntityType Name="LicenceIssueDetails">
          <Key>
            <PropertyRef Name="LicenceIssueDetailID" />
          </Key>
          <Property Name="LicenceIssueDetailID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="ApplicationRequestDetailID" Type="bigint" Nullable="false" />
          <Property Name="VerifiedLicenceID" Type="bigint" Nullable="false" />
          <Property Name="VerifiedVehicleID" Type="bigint" />
          <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="IsDocumentVerificationRequired" Type="bit" />
          <Property Name="ApplicationVehicleDetailsInBulkID" Type="bigint" />
        </EntityType>
        <EntityType Name="LicenceIssueDocuments">
          <Key>
            <PropertyRef Name="LicenceIssueDocumentID" />
          </Key>
          <Property Name="LicenceIssueDocumentID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="LicenceIssueDetailID" Type="bigint" Nullable="false" />
          <Property Name="DocumentTypeID" Type="smallint" Nullable="false" />
          <Property Name="DocumentID" Type="bigint" />
          <Property Name="IsMandatory" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="LicenceIssueInspectionDetails">
          <Key>
            <PropertyRef Name="LicenceIssueDetailID" />
          </Key>
          <Property Name="LicenceIssueDetailID" Type="bigint" Nullable="false" />
          <Property Name="LicenceIssueInspectionOutcomeID" Type="smallint" />
          <Property Name="InspectedByID" Type="bigint" />
          <Property Name="DateInspected" Type="datetime" />
          <Property Name="EngineNumber" Type="varchar" MaxLength="20" />
          <Property Name="ChassisNumber" Type="varchar" MaxLength="20" />
          <Property Name="InspectionSheetDocumentID" Type="bigint" />
          <Property Name="FrontRegDocumentID" Type="bigint" />
          <Property Name="ChassisDocumentID" Type="bigint" />
          <Property Name="EngineDocumentID" Type="bigint" />
          <Property Name="BackRegDocumentID" Type="bigint" />
          <Property Name="Additional1DocumentID" Type="bigint" />
          <Property Name="Additional2DocumentID" Type="bigint" />
        </EntityType>
        <EntityType Name="DocumentTypes">
          <Key>
            <PropertyRef Name="DocumentTypeID" />
          </Key>
          <Property Name="DocumentTypeID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="IsDocumentTemplate" Type="bit" Nullable="false" />
          <Property Name="IsDocumentTitleEditable" Type="bit" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="RouteTypes">
          <Key>
            <PropertyRef Name="RouteTypeID" />
          </Key>
          <Property Name="RouteTypeID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="LicenceExceptions">
          <Key>
            <PropertyRef Name="LicenceExceptionID" />
          </Key>
          <Property Name="LicenceExceptionID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="LicenceID" Type="bigint" Nullable="false" />
          <Property Name="Exception" Type="nvarchar" MaxLength="255" Nullable="false" />
        </EntityType>
        <EntityType Name="LicenceRoutes">
          <Key>
            <PropertyRef Name="LicenceID" />
            <PropertyRef Name="RouteID" />
          </Key>
          <Property Name="LicenceID" Type="bigint" Nullable="false" />
          <Property Name="RouteID" Type="bigint" Nullable="false" />
        </EntityType>
        <EntityType Name="Licences">
          <Key>
            <PropertyRef Name="LicenceID" />
          </Key>
          <Property Name="LicenceID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ApplicationRequestDetailID" Type="bigint" Nullable="false" />
          <Property Name="LicenceStatusID" Type="smallint" Nullable="false" />
          <Property Name="MemberID" Type="bigint" Nullable="false" />
          <Property Name="VehicleID" Type="bigint" />
          <Property Name="ModeID" Type="smallint" Nullable="false" />
          <Property Name="NameOnLicence" Type="varchar" MaxLength="100" />
          <Property Name="OperatingLicenceNumber" Type="varchar" MaxLength="18" StoreGeneratedPattern="Computed" />
          <Property Name="IssueNumber" Type="int" Nullable="false" />
          <Property Name="CertificateNumber" Type="varchar" MaxLength="100" />
          <Property Name="DateOfIssue" Type="datetime" />
          <Property Name="DateOfExpiry" Type="datetime" />
          <Property Name="Indefinite" Type="bit" Nullable="false" />
          <Property Name="UpcomingExpiryNotificationSmsSentDate" Type="datetime" />
          <Property Name="ExpiredNotificationSmsSentDate" Type="datetime" />
          <Property Name="UpliftmentReminderSmsSentDate" Type="datetime" />
          <Property Name="OriginalLTPSPermitNumber" Type="varchar" MaxLength="20" />
          <Property Name="OriginalOLASNumber" Type="varchar" MaxLength="20" />
          <Property Name="IsLatestIssue" Type="bit" />
          <Property Name="ApplicationVehicleDetailsInBulkID" Type="bigint" />
        </EntityType>
        <EntityType Name="Members">
          <Key>
            <PropertyRef Name="MemberID" />
          </Key>
          <Property Name="MemberID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="53" StoreGeneratedPattern="Computed" />
          <Property Name="FullName" Type="varchar" MaxLength="511" StoreGeneratedPattern="Computed" Nullable="false" />
          <Property Name="IdentityDocumentDocID" Type="bigint" />
          <Property Name="TaxClearanceCertificateDocID" Type="bigint" />
          <Property Name="SurnameOrCompanyName" Type="varchar" MaxLength="255" />
          <Property Name="FirstNames" Type="varchar" MaxLength="255" />
          <Property Name="IDTypeID" Type="smallint" />
          <Property Name="IDTypeDescription" Type="varchar" MaxLength="50" />
          <Property Name="IDNumberOrBusinessRegistrationNo" Type="varchar" MaxLength="20" />
          <Property Name="PostalAddress" Type="varchar" MaxLength="400" />
          <Property Name="PostalAddressCode" Type="varchar" MaxLength="4" />
          <Property Name="PhysicalAddress" Type="varchar" MaxLength="400" />
          <Property Name="PhysicalAddressCode" Type="varchar" MaxLength="4" />
          <Property Name="TelPhone" Type="varchar" MaxLength="14" />
          <Property Name="TelCell" Type="varchar" MaxLength="14" />
          <Property Name="TelFax" Type="varchar" MaxLength="14" />
          <Property Name="Email" Type="varchar" MaxLength="150" />
          <Property Name="SARSIncomeTaxNumber" Type="varchar" MaxLength="20" />
          <Property Name="SARSReasonIfNoTaxNumber" Type="varchar" MaxLength="1000" />
          <Property Name="TradeName" Type="varchar" MaxLength="255" />
          <Property Name="MemberStatusID" Type="smallint" Nullable="false" />
          <Property Name="OlasID" Type="bigint" />
          <Property Name="LtpsID" Type="bigint" />
          <Property Name="NeoID" Type="bigint" />
          <Property Name="BusinessTypeID" Type="bigint" />
        </EntityType>
        <EntityType Name="Places">
          <Key>
            <PropertyRef Name="PlaceID" />
          </Key>
          <Property Name="PlaceID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="PlaceTypeID" Type="smallint" Nullable="false" />
          <Property Name="PlaceStatusID" Type="smallint" Nullable="false" />
          <Property Name="OlasID" Type="bigint" />
          <Property Name="LtpsID" Type="bigint" />
          <Property Name="NeoID" Type="bigint" />
        </EntityType>
        <EntityType Name="Routes">
          <Key>
            <PropertyRef Name="RouteID" />
          </Key>
          <Property Name="RouteID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="53" StoreGeneratedPattern="Computed" />
          <Property Name="RouteTypeID" Type="smallint" Nullable="false" />
          <Property Name="RouteName" Type="varchar" MaxLength="500" Nullable="false" />
          <Property Name="Description" Type="varchar(max)" Nullable="false" />
          <Property Name="OriginPlaceID" Type="bigint" />
          <Property Name="DestinationPlaceID" Type="bigint" />
          <Property Name="NationalRouteNumber" Type="varchar" MaxLength="100" />
          <Property Name="BoardRouteNumber" Type="varchar" MaxLength="100" />
          <Property Name="RouteLength" Type="float" />
          <Property Name="RouteStatusID" Type="smallint" Nullable="false" />
          <Property Name="OlasID" Type="bigint" />
          <Property Name="LtpsID" Type="bigint" />
          <Property Name="NeoID" Type="bigint" />
          <Property Name="ProvinceID" Type="bigint" />
          <Property Name="TimeTableDocumentID" Type="bigint" />
          <Property Name="FareScheduleDocumentID" Type="bigint" />
          <Property Name="IsChecked" Type="bit" Nullable="false" />
          <Property Name="IsPotentialIncorrectRouteChange" Type="bit" Nullable="false" />
          <Property Name="IsPotentialIncorrectRouteChangeProbability" Type="smallint" />
        </EntityType>
        <EntityType Name="Vehicles">
          <Key>
            <PropertyRef Name="VehicleID" />
          </Key>
          <Property Name="VehicleID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="53" StoreGeneratedPattern="Computed" />
          <Property Name="RegistrationNumber" Type="varchar" MaxLength="50" />
          <Property Name="EngineNumber" Type="varchar" MaxLength="50" />
          <Property Name="VIN" Type="varchar" MaxLength="50" />
          <Property Name="SeatedCapacity" Type="int" />
          <Property Name="StandingCapacity" Type="int" />
          <Property Name="GrossMass" Type="bigint" />
          <Property Name="VehicleMakeID" Type="smallint" />
          <Property Name="VehicleTypeID" Type="smallint" />
          <Property Name="VehicleStatusID" Type="smallint" Nullable="false" />
          <Property Name="OlasID" Type="bigint" />
          <Property Name="LtpsID" Type="bigint" />
          <Property Name="NeoID" Type="bigint" />
          <Property Name="CarryingCapacityID" Type="smallint" />
          <Property Name="YearOfManufacture" Type="varchar" MaxLength="4" />
          <Property Name="IgnoreVinException" Type="bit" />
        </EntityType>
        <Association Name="FK_ApplicationVehicleDetails_ApplicationRequestDetails">
          <End Role="ApplicationRequestDetails" Type="Self.ApplicationRequestDetails" Multiplicity="1" />
          <End Role="ApplicationVehicleDetails" Type="Self.ApplicationVehicleDetails" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="ApplicationRequestDetails">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Principal>
            <Dependent Role="ApplicationVehicleDetails">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceExceptions_Licences">
          <End Role="Licences" Type="Self.Licences" Multiplicity="1" />
          <End Role="LicenceExceptions" Type="Self.LicenceExceptions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Licences">
              <PropertyRef Name="LicenceID" />
            </Principal>
            <Dependent Role="LicenceExceptions">
              <PropertyRef Name="LicenceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDetails_ApplicationRequestDetails1">
          <End Role="ApplicationRequestDetails" Type="Self.ApplicationRequestDetails" Multiplicity="1" />
          <End Role="LicenceIssueDetails" Type="Self.LicenceIssueDetails" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="ApplicationRequestDetails">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueDetails">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDetails_Licences">
          <End Role="Licences" Type="Self.Licences" Multiplicity="1" />
          <End Role="LicenceIssueDetails" Type="Self.LicenceIssueDetails" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Licences">
              <PropertyRef Name="LicenceID" />
            </Principal>
            <Dependent Role="LicenceIssueDetails">
              <PropertyRef Name="VerifiedLicenceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDocuments_DocumentTypes">
          <End Role="DocumentTypes" Type="Self.DocumentTypes" Multiplicity="1" />
          <End Role="LicenceIssueDocuments" Type="Self.LicenceIssueDocuments" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="DocumentTypes">
              <PropertyRef Name="DocumentTypeID" />
            </Principal>
            <Dependent Role="LicenceIssueDocuments">
              <PropertyRef Name="DocumentTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDocuments_LicenceIssueDetails">
          <End Role="LicenceIssueDetails" Type="Self.LicenceIssueDetails" Multiplicity="1" />
          <End Role="LicenceIssueDocuments" Type="Self.LicenceIssueDocuments" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="LicenceIssueDetails">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueDocuments">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueInspectionDetails_LicenceIssueDetails">
          <End Role="LicenceIssueDetails" Type="Self.LicenceIssueDetails" Multiplicity="1" />
          <End Role="LicenceIssueInspectionDetails" Type="Self.LicenceIssueInspectionDetails" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="LicenceIssueDetails">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueInspectionDetails">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceRoutes_Licences">
          <End Role="Licences" Type="Self.Licences" Multiplicity="1" />
          <End Role="LicenceRoutes" Type="Self.LicenceRoutes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Licences">
              <PropertyRef Name="LicenceID" />
            </Principal>
            <Dependent Role="LicenceRoutes">
              <PropertyRef Name="LicenceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Licences_Members">
          <End Role="Members" Type="Self.Members" Multiplicity="1" />
          <End Role="Licences" Type="Self.Licences" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Members">
              <PropertyRef Name="MemberID" />
            </Principal>
            <Dependent Role="Licences">
              <PropertyRef Name="MemberID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Routes_DestinationPlace">
          <End Role="Places" Type="Self.Places" Multiplicity="0..1" />
          <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Places">
              <PropertyRef Name="PlaceID" />
            </Principal>
            <Dependent Role="Routes">
              <PropertyRef Name="DestinationPlaceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Routes_OriginPlace">
          <End Role="Places" Type="Self.Places" Multiplicity="0..1" />
          <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Places">
              <PropertyRef Name="PlaceID" />
            </Principal>
            <Dependent Role="Routes">
              <PropertyRef Name="OriginPlaceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Routes_RouteTypes">
          <End Role="RouteTypes" Type="Self.RouteTypes" Multiplicity="1" />
          <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="RouteTypes">
              <PropertyRef Name="RouteTypeID" />
            </Principal>
            <Dependent Role="Routes">
              <PropertyRef Name="RouteTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_CleanseUnusedVehicleData" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App" />
        <Function Name="Pr_LicenceIssueCheckSecurity" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="LicenceIssueDetailID" Type="bigint" Mode="In" />
          <Parameter Name="Action" Type="varchar" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_LicenceIssuePostSaveProcess" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="LicenceIssueDetailID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_LicenceExceptionsUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Verified">
          <Parameter Name="LicenceID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_VehicleGetLinkedByVIN" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Verified">
          <Parameter Name="VIN" Type="varchar" Mode="In" />
        </Function>
        <EntityContainer Name="LicenceIssueModelStoreContainer">
          <EntitySet Name="ApplicationRequestDetails" EntityType="Self.ApplicationRequestDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="ApplicationVehicleDetails" EntityType="Self.ApplicationVehicleDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="LicenceIssueDetails" EntityType="Self.LicenceIssueDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="LicenceIssueDocuments" EntityType="Self.LicenceIssueDocuments" Schema="App" store:Type="Tables" />
          <EntitySet Name="LicenceIssueInspectionDetails" EntityType="Self.LicenceIssueInspectionDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="DocumentTypes" EntityType="Self.DocumentTypes" Schema="Doc" store:Type="Tables" />
          <EntitySet Name="RouteTypes" EntityType="Self.RouteTypes" Schema="Md" store:Type="Tables" />
          <EntitySet Name="LicenceExceptions" EntityType="Self.LicenceExceptions" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="LicenceRoutes" EntityType="Self.LicenceRoutes" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Licences" EntityType="Self.Licences" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Members" EntityType="Self.Members" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Places" EntityType="Self.Places" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Routes" EntityType="Self.Routes" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Vehicles" EntityType="Self.Vehicles" Schema="Verified" store:Type="Tables" />
          <AssociationSet Name="FK_ApplicationVehicleDetails_ApplicationRequestDetails" Association="Self.FK_ApplicationVehicleDetails_ApplicationRequestDetails">
            <End Role="ApplicationRequestDetails" EntitySet="ApplicationRequestDetails" />
            <End Role="ApplicationVehicleDetails" EntitySet="ApplicationVehicleDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceExceptions_Licences" Association="Self.FK_LicenceExceptions_Licences">
            <End Role="Licences" EntitySet="Licences" />
            <End Role="LicenceExceptions" EntitySet="LicenceExceptions" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDetails_ApplicationRequestDetails1" Association="Self.FK_LicenceIssueDetails_ApplicationRequestDetails1">
            <End Role="ApplicationRequestDetails" EntitySet="ApplicationRequestDetails" />
            <End Role="LicenceIssueDetails" EntitySet="LicenceIssueDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDetails_Licences" Association="Self.FK_LicenceIssueDetails_Licences">
            <End Role="Licences" EntitySet="Licences" />
            <End Role="LicenceIssueDetails" EntitySet="LicenceIssueDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDocuments_DocumentTypes" Association="Self.FK_LicenceIssueDocuments_DocumentTypes">
            <End Role="DocumentTypes" EntitySet="DocumentTypes" />
            <End Role="LicenceIssueDocuments" EntitySet="LicenceIssueDocuments" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDocuments_LicenceIssueDetails" Association="Self.FK_LicenceIssueDocuments_LicenceIssueDetails">
            <End Role="LicenceIssueDetails" EntitySet="LicenceIssueDetails" />
            <End Role="LicenceIssueDocuments" EntitySet="LicenceIssueDocuments" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueInspectionDetails_LicenceIssueDetails" Association="Self.FK_LicenceIssueInspectionDetails_LicenceIssueDetails">
            <End Role="LicenceIssueDetails" EntitySet="LicenceIssueDetails" />
            <End Role="LicenceIssueInspectionDetails" EntitySet="LicenceIssueInspectionDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceRoutes_Licences" Association="Self.FK_LicenceRoutes_Licences">
            <End Role="Licences" EntitySet="Licences" />
            <End Role="LicenceRoutes" EntitySet="LicenceRoutes" />
          </AssociationSet>
          <AssociationSet Name="FK_Licences_Members" Association="Self.FK_Licences_Members">
            <End Role="Members" EntitySet="Members" />
            <End Role="Licences" EntitySet="Licences" />
          </AssociationSet>
          <AssociationSet Name="FK_Routes_DestinationPlace" Association="Self.FK_Routes_DestinationPlace">
            <End Role="Places" EntitySet="Places" />
            <End Role="Routes" EntitySet="Routes" />
          </AssociationSet>
          <AssociationSet Name="FK_Routes_OriginPlace" Association="Self.FK_Routes_OriginPlace">
            <End Role="Places" EntitySet="Places" />
            <End Role="Routes" EntitySet="Routes" />
          </AssociationSet>
          <AssociationSet Name="FK_Routes_RouteTypes" Association="Self.FK_Routes_RouteTypes">
            <End Role="RouteTypes" EntitySet="RouteTypes" />
            <End Role="Routes" EntitySet="Routes" />
          </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="LicenceIssueContext" annotation:LazyLoadingEnabled="false">
          <FunctionImport Name="Pr_LicenceIssueRequestDetailsSearch">
            <Parameter Name="LicenceIssueRequestDetailID" Mode="In" Type="Int64" />
            <Parameter Name="WorkflowInstanceStatusID" Mode="In" Type="Int16" />
          </FunctionImport>
          <EntitySet Name="LicenceIssueDetails" EntityType="Model.LicenceIssueDetail" />
          <EntitySet Name="Licences" EntityType="Model.Licence" />
          <EntitySet Name="Vehicles" EntityType="Model.Vehicle" />
          <AssociationSet Name="FK_LicenceIssueDetails_Licences" Association="Model.FK_LicenceIssueDetails_Licences">
            <End Role="Licence" EntitySet="Licences" />
            <End Role="LicenceIssueDetail" EntitySet="LicenceIssueDetails" />
          </AssociationSet>
          <EntitySet Name="LicenceIssueDocuments" EntityType="Model.LicenceIssueDocument" />
          <AssociationSet Name="FK_LicenceIssueDocuments_LicenceIssueDetails" Association="Model.FK_LicenceIssueDocuments_LicenceIssueDetails">
            <End Role="LicenceIssueDetail" EntitySet="LicenceIssueDetails" />
            <End Role="LicenceIssueDocument" EntitySet="LicenceIssueDocuments" />
          </AssociationSet>
          <EntitySet Name="DocumentTypes" EntityType="Model.DocumentType" />
          <AssociationSet Name="FK_LicenceIssueDocuments_DocumentTypes" Association="Model.FK_LicenceIssueDocuments_DocumentTypes">
            <End Role="DocumentType" EntitySet="DocumentTypes" />
            <End Role="LicenceIssueDocument" EntitySet="LicenceIssueDocuments" />
          </AssociationSet>
          <EntitySet Name="Routes" EntityType="Model.Route" />
          <AssociationSet Name="LicenceRoutes" Association="Model.LicenceRoutes">
            <End Role="Licence" EntitySet="Licences" />
            <End Role="Route" EntitySet="Routes" />
          </AssociationSet>
          <EntitySet Name="RouteTypes" EntityType="Model.RouteType" />
          <AssociationSet Name="FK_Routes_RouteTypes" Association="Model.FK_Routes_RouteTypes">
            <End Role="RouteType" EntitySet="RouteTypes" />
            <End Role="Route" EntitySet="Routes" />
          </AssociationSet>
          <EntitySet Name="Members" EntityType="Model.Member" />
          <AssociationSet Name="FK_Licences_Members" Association="Model.FK_Licences_Members">
            <End Role="Member" EntitySet="Members" />
            <End Role="Licence" EntitySet="Licences" />
          </AssociationSet>
          <EntitySet Name="Places" EntityType="Model.Place" />
          <AssociationSet Name="FK_Routes_DestinationPlace" Association="Model.FK_Routes_DestinationPlace">
            <End Role="Place" EntitySet="Places" />
            <End Role="Route" EntitySet="Routes" />
          </AssociationSet>
          <AssociationSet Name="FK_Routes_OriginPlace" Association="Model.FK_Routes_OriginPlace">
            <End Role="Place" EntitySet="Places" />
            <End Role="Route" EntitySet="Routes" />
          </AssociationSet>
          <EntitySet Name="LicenceIssueInspectionDetails" EntityType="Model.LicenceIssueInspectionDetail" />
          <AssociationSet Name="FK_LicenceIssueInspectionDetails_LicenceIssueDetails" Association="Model.FK_LicenceIssueInspectionDetails_LicenceIssueDetails">
            <End Role="LicenceIssueDetail" EntitySet="LicenceIssueDetails" />
            <End Role="LicenceIssueInspectionDetail" EntitySet="LicenceIssueInspectionDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDetails_Vehicles" Association="Model.FK_LicenceIssueDetails_Vehicles">
            <End Role="Vehicle" EntitySet="Vehicles" />
            <End Role="LicenceIssueDetail" EntitySet="LicenceIssueDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_Licences_Vehicles" Association="Model.FK_Licences_Vehicles">
            <End Role="Vehicle" EntitySet="Vehicles" />
            <End Role="Licence" EntitySet="Licences" />
          </AssociationSet>
          <EntitySet Name="ApplicationRequestDetails" EntityType="Model.ApplicationRequestDetail" />
          <EntitySet Name="ApplicationVehicleDetails" EntityType="Model.ApplicationVehicleDetail" />
          <AssociationSet Name="FK_ApplicationVehicleDetails_ApplicationRequestDetails" Association="Model.FK_ApplicationVehicleDetails_ApplicationRequestDetails">
            <End Role="ApplicationRequestDetail" EntitySet="ApplicationRequestDetails" />
            <End Role="ApplicationVehicleDetail" EntitySet="ApplicationVehicleDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_LicenceIssueDetails_ApplicationRequestDetails1" Association="Model.FK_LicenceIssueDetails_ApplicationRequestDetails1">
            <End Role="ApplicationRequestDetail" EntitySet="ApplicationRequestDetails" />
            <End Role="LicenceIssueDetail" EntitySet="LicenceIssueDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_ApplicationVehicleDetails_Vehicles" Association="Model.FK_ApplicationVehicleDetails_Vehicles">
            <End Role="Vehicle" EntitySet="Vehicles" />
            <End Role="ApplicationVehicleDetail" EntitySet="ApplicationVehicleDetails" />
          </AssociationSet>
          <FunctionImport Name="Pr_LicenceIssuePostSaveProcess">
          <Parameter Name="LicenceIssueDetailID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_VehicleGetLinkedByVIN" ReturnType="Collection(String)">
          <Parameter Name="VIN" Mode="In" Type="String" />
          </FunctionImport>
          <EntitySet Name="LicenceExceptions" EntityType="Model.LicenceException" />
          <AssociationSet Name="FK_LicenceExceptions_Licences" Association="Model.FK_LicenceExceptions_Licences">
            <End Role="Licence" EntitySet="Licences" />
            <End Role="LicenceException" EntitySet="LicenceExceptions" />
          </AssociationSet>
          <FunctionImport Name="Pr_LicenceExceptionsUpdate">
          <Parameter Name="LicenceID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_LicenceIssueCheckSecurity">
            <Parameter Name="LicenceIssueDetailID" Mode="In" Type="Int64" />
            <Parameter Name="Action" Mode="In" Type="String" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_CleanseUnusedVehicleData" />
        </EntityContainer>
        <EntityType Name="LicenceIssueDetail">
          <Key>
            <PropertyRef Name="LicenceIssueDetailID" />
          </Key>
          <Property Type="Int64" Name="LicenceIssueDetailID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowInstanceID" />
          <Property Type="Int64" Name="ApplicationRequestDetailID" Nullable="false" />
          <Property Type="Int64" Name="VerifiedLicenceID" Nullable="false" />
          <Property Type="Int64" Name="VerifiedVehicleID" />
          <Property Type="Int64" Name="CreatedByID" Nullable="false" />
          <Property Type="DateTime" Name="CreatedDate" Nullable="false" Precision="3" />
          <Property Type="Int64" Name="UpdatedByID" Nullable="false" />
          <Property Type="DateTime" Name="UpdatedDate" Nullable="false" Precision="3" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="Licence" Relationship="Model.FK_LicenceIssueDetails_Licences" FromRole="LicenceIssueDetail" ToRole="Licence" >
          </NavigationProperty>
          <NavigationProperty Name="Documents" Relationship="Model.FK_LicenceIssueDocuments_LicenceIssueDetails" FromRole="LicenceIssueDetail" ToRole="LicenceIssueDocument" />
          <NavigationProperty Name="Inspection" Relationship="Model.FK_LicenceIssueInspectionDetails_LicenceIssueDetails" FromRole="LicenceIssueDetail" ToRole="LicenceIssueInspectionDetail" />
          <NavigationProperty Name="Vehicle" Relationship="Model.FK_LicenceIssueDetails_Vehicles" FromRole="LicenceIssueDetail" ToRole="Vehicle" />
          <NavigationProperty Name="ApplicationRequestDetail" Relationship="Model.FK_LicenceIssueDetails_ApplicationRequestDetails1" FromRole="LicenceIssueDetail" ToRole="ApplicationRequestDetail" />
          <Property Name="IsDocumentVerificationRequired" Type="Boolean" />
          <Property Name="ApplicationVehicleDetailsInBulkID" Type="Int64" />
        </EntityType>
        <EntityType Name="Licence">
          <Key>
            <PropertyRef Name="LicenceID" />
          </Key>
          <Property Type="Int64" Name="LicenceID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="ApplicationRequestDetailID" Nullable="false" />
          <Property Type="Int16" Name="LicenceStatusID" Nullable="false" />
          <Property Type="Int64" Name="MemberID" Nullable="false" />
          <Property Type="Int64" Name="VehicleID" />
          <Property Type="Int16" Name="ModeID" Nullable="false" />
          <Property Type="String" Name="NameOnLicence" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="OperatingLicenceNumber" MaxLength="18" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="Int32" Name="IssueNumber" Nullable="false" />
          <Property Type="String" Name="CertificateNumber" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="DateTime" Name="DateOfIssue" Precision="3" />
          <Property Type="DateTime" Name="DateOfExpiry" Precision="3" />
          <Property Type="Boolean" Name="Indefinite" Nullable="false" />
          <NavigationProperty Name="LicenceIssueDetails" Relationship="Model.FK_LicenceIssueDetails_Licences" FromRole="Licence" ToRole="LicenceIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Routes" Relationship="Model.LicenceRoutes" FromRole="Licence" ToRole="Route" />
          <NavigationProperty Name="Member" Relationship="Model.FK_Licences_Members" FromRole="Licence" ToRole="Member" />
          <Property Type="DateTime" Name="UpcomingExpiryNotificationSmsSentDate" Precision="3" />
          <Property Type="DateTime" Name="ExpiredNotificationSmsSentDate" Precision="3" />
          <NavigationProperty Name="Vehicle" Relationship="Model.FK_Licences_Vehicles" FromRole="Licence" ToRole="Vehicle" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Name="UpliftmentReminderSmsSentDate" Type="DateTime" Precision="3" />
          <NavigationProperty Name="Exceptions" Relationship="Model.FK_LicenceExceptions_Licences" FromRole="Licence" ToRole="LicenceException" />
          <Property Name="OriginalLTPSPermitNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="OriginalOLASNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="IsLatestIssue" Type="Boolean" />
          <Property Name="ApplicationVehicleDetailsInBulkID" Type="Int64" />
        </EntityType>
        <EntityType Name="Vehicle">
          <Key>
            <PropertyRef Name="VehicleID" />
          </Key>
          <Property Type="Int64" Name="VehicleID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="String" Name="ReferenceNumber" MaxLength="53" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="String" Name="RegistrationNumber" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="EngineNumber" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="VIN" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int32" Name="SeatedCapacity" />
          <Property Type="Int32" Name="StandingCapacity" />
          <Property Type="Int32" Name="GrossMass" />
          <Property Type="Int16" Name="VehicleMakeID" />
          <Property Type="Int16" Name="VehicleTypeID" />
          <Property Type="Int16" Name="VehicleStatusID" Nullable="false" />
          <Property Type="Int64" Name="OlasID" />
          <Property Type="Int64" Name="LtpsID" />
          <Property Type="Int64" Name="NeoID" />
          <NavigationProperty Name="LicenceIssueDetails" Relationship="Model.FK_LicenceIssueDetails_Vehicles" FromRole="Vehicle" ToRole="LicenceIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Licences" Relationship="Model.FK_Licences_Vehicles" FromRole="Vehicle" ToRole="Licence" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Type="String" Name="YearOfManufacture" MaxLength="4" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="CarryingCapacityID" />
          <NavigationProperty Name="ApplicationVehicleDetails" Relationship="Model.FK_ApplicationVehicleDetails_Vehicles" FromRole="Vehicle" ToRole="ApplicationVehicleDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Name="IgnoreVinException" Type="Boolean" />
        </EntityType>
        <Association Name="FK_LicenceIssueDetails_Licences">
          <End Type="Model.Licence" Role="Licence" Multiplicity="1" />
          <End Type="Model.LicenceIssueDetail" Role="LicenceIssueDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Licence">
              <PropertyRef Name="LicenceID" />
            </Principal>
            <Dependent Role="LicenceIssueDetail">
              <PropertyRef Name="VerifiedLicenceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="LicenceIssueDocument">
          <Key>
            <PropertyRef Name="LicenceIssueDocumentID" />
          </Key>
          <Property Type="Int64" Name="LicenceIssueDocumentID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="LicenceIssueDetailID" Nullable="false" />
          <Property Type="Int16" Name="DocumentTypeID" Nullable="false" />
          <NavigationProperty Name="LicenceIssueDetail" Relationship="Model.FK_LicenceIssueDocuments_LicenceIssueDetails" FromRole="LicenceIssueDocument" ToRole="LicenceIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="DocumentType" Relationship="Model.FK_LicenceIssueDocuments_DocumentTypes" FromRole="LicenceIssueDocument" ToRole="DocumentType" />
          <Property Name="IsMandatory" Type="Boolean" Nullable="false" />
          <Property Name="DocumentID" Type="Int64" />
        </EntityType>
        <Association Name="FK_LicenceIssueDocuments_LicenceIssueDetails">
          <End Type="Model.LicenceIssueDetail" Role="LicenceIssueDetail" Multiplicity="1" />
          <End Type="Model.LicenceIssueDocument" Role="LicenceIssueDocument" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="LicenceIssueDetail">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueDocument">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="DocumentType">
          <Key>
            <PropertyRef Name="DocumentTypeID" />
          </Key>
          <Property Type="Int16" Name="DocumentTypeID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="LicenceIssueDocuments" Relationship="Model.FK_LicenceIssueDocuments_DocumentTypes" FromRole="DocumentType" ToRole="LicenceIssueDocument" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Type="Boolean" Name="IsDocumentTemplate" Nullable="false" />
          <Property Type="Boolean" Name="IsDocumentTitleEditable" Nullable="false" />
        </EntityType>
        <Association Name="FK_LicenceIssueDocuments_DocumentTypes">
          <End Type="Model.DocumentType" Role="DocumentType" Multiplicity="1" />
          <End Type="Model.LicenceIssueDocument" Role="LicenceIssueDocument" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="DocumentType">
              <PropertyRef Name="DocumentTypeID" />
            </Principal>
            <Dependent Role="LicenceIssueDocument">
              <PropertyRef Name="DocumentTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Route">
          <Key>
            <PropertyRef Name="RouteID" />
          </Key>
          <Property Type="Int64" Name="RouteID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="String" Name="ReferenceNumber" MaxLength="53" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="Int16" Name="RouteTypeID" Nullable="false" />
          <Property Type="String" Name="RouteName" Nullable="false" MaxLength="500" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="OriginPlaceID" />
          <Property Type="Int64" Name="DestinationPlaceID" />
          <Property Type="String" Name="NationalRouteNumber" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="BoardRouteNumber" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="Double" Name="RouteLength" />
          <Property Type="Int16" Name="RouteStatusID" Nullable="false" />
          <Property Type="Int64" Name="OlasID" />
          <Property Type="Int64" Name="LtpsID" />
          <NavigationProperty Name="Licences" Relationship="Model.LicenceRoutes" FromRole="Route" ToRole="Licence" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="RouteType" Relationship="Model.FK_Routes_RouteTypes" FromRole="Route" ToRole="RouteType" />
          <NavigationProperty Name="Destination" Relationship="Model.FK_Routes_DestinationPlace" FromRole="Route" ToRole="Place" />
          <NavigationProperty Name="Origin" Relationship="Model.FK_Routes_OriginPlace" FromRole="Route" ToRole="Place" />
          <Property Type="Int64" Name="NeoID" />
          <Property Type="Int64" Name="ProvinceID" />
          <Property Name="TimeTableDocumentID" Type="Int64" />
          <Property Name="FareScheduleDocumentID" Type="Int64" />
          <Property Name="IsChecked" Type="Boolean" Nullable="false" />
          <Property Name="IsPotentialIncorrectRouteChange" Type="Boolean" Nullable="false" />
          <Property Name="IsPotentialIncorrectRouteChangeProbability" Type="Int16" />
        </EntityType>
        <Association Name="LicenceRoutes">
          <End Type="Model.Licence" Role="Licence" Multiplicity="*" />
          <End Type="Model.Route" Role="Route" Multiplicity="*" />
        </Association>
        <EntityType Name="RouteType">
          <Key>
            <PropertyRef Name="RouteTypeID" />
          </Key>
          <Property Type="Int16" Name="RouteTypeID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="Routes" Relationship="Model.FK_Routes_RouteTypes" FromRole="RouteType" ToRole="Route" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_Routes_RouteTypes">
          <End Type="Model.RouteType" Role="RouteType" Multiplicity="1" />
          <End Type="Model.Route" Role="Route" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="RouteType">
              <PropertyRef Name="RouteTypeID" />
            </Principal>
            <Dependent Role="Route">
              <PropertyRef Name="RouteTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Member">
          <Key>
            <PropertyRef Name="MemberID" />
          </Key>
          <Property Type="Int64" Name="MemberID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="String" Name="ReferenceNumber" MaxLength="53" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="String" Name="FullName" Nullable="false" MaxLength="511" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="Int64" Name="IdentityDocumentDocID" />
          <Property Type="Int64" Name="TaxClearanceCertificateDocID" />
          <Property Type="String" Name="SurnameOrCompanyName" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="FirstNames" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="IDTypeID" />
          <Property Type="String" Name="IDTypeDescription" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="IDNumberOrBusinessRegistrationNo" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="PostalAddress" MaxLength="400" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="PostalAddressCode" MaxLength="4" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="PhysicalAddress" MaxLength="400" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="PhysicalAddressCode" MaxLength="4" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="TelPhone" MaxLength="14" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="TelCell" MaxLength="14" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="TelFax" MaxLength="14" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="Email" MaxLength="150" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="SARSIncomeTaxNumber" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="SARSReasonIfNoTaxNumber" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="TradeName" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="MemberStatusID" Nullable="false" />
          <Property Type="Int64" Name="OlasID" />
          <Property Type="Int64" Name="LtpsID" />
          <NavigationProperty Name="Licences" Relationship="Model.FK_Licences_Members" FromRole="Member" ToRole="Licence" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Type="Int64" Name="NeoID" />
          <Property Name="BusinessTypeID" Type="Int64" />
        </EntityType>
        <Association Name="FK_Licences_Members">
          <End Type="Model.Member" Role="Member" Multiplicity="1" />
          <End Type="Model.Licence" Role="Licence" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Member">
              <PropertyRef Name="MemberID" />
            </Principal>
            <Dependent Role="Licence">
              <PropertyRef Name="MemberID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Place">
          <Key>
            <PropertyRef Name="PlaceID" />
          </Key>
          <Property Type="Int64" Name="PlaceID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="PlaceTypeID" Nullable="false" />
          <Property Type="Int16" Name="PlaceStatusID" Nullable="false" />
          <Property Type="Int64" Name="OlasID" />
          <Property Type="Int64" Name="LtpsID" />
          <NavigationProperty Name="Routes" Relationship="Model.FK_Routes_DestinationPlace" FromRole="Place" ToRole="Route" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Routes1" Relationship="Model.FK_Routes_OriginPlace" FromRole="Place" ToRole="Route" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Type="Int64" Name="NeoID" />
        </EntityType>
        <Association Name="FK_Routes_DestinationPlace">
          <End Type="Model.Place" Role="Place" Multiplicity="0..1" />
          <End Type="Model.Route" Role="Route" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Place">
              <PropertyRef Name="PlaceID" />
            </Principal>
            <Dependent Role="Route">
              <PropertyRef Name="DestinationPlaceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Routes_OriginPlace">
          <End Type="Model.Place" Role="Place" Multiplicity="0..1" />
          <End Type="Model.Route" Role="Route" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Place">
              <PropertyRef Name="PlaceID" />
            </Principal>
            <Dependent Role="Route">
              <PropertyRef Name="OriginPlaceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="LicenceIssueInspectionDetail">
          <Key>
            <PropertyRef Name="LicenceIssueDetailID" />
          </Key>
          <Property Type="Int64" Name="LicenceIssueDetailID" Nullable="false" />
          <Property Type="Int16" Name="LicenceIssueInspectionOutcomeID" />
          <Property Type="Int64" Name="InspectedByID" />
          <Property Type="DateTime" Name="DateInspected" Precision="3" />
          <Property Type="String" Name="EngineNumber" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="ChassisNumber" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="InspectionSheetDocumentID" />
          <Property Type="Int64" Name="FrontRegDocumentID" />
          <Property Type="Int64" Name="ChassisDocumentID" />
          <Property Type="Int64" Name="EngineDocumentID" />
          <Property Type="Int64" Name="BackRegDocumentID" />
          <Property Type="Int64" Name="Additional1DocumentID" />
          <Property Type="Int64" Name="Additional2DocumentID" />
          <NavigationProperty Name="LicenceIssueDetail" Relationship="Model.FK_LicenceIssueInspectionDetails_LicenceIssueDetails" FromRole="LicenceIssueInspectionDetail" ToRole="LicenceIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_LicenceIssueInspectionDetails_LicenceIssueDetails">
          <End Type="Model.LicenceIssueDetail" Role="LicenceIssueDetail" Multiplicity="1" />
          <End Type="Model.LicenceIssueInspectionDetail" Role="LicenceIssueInspectionDetail" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="LicenceIssueDetail">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueInspectionDetail">
              <PropertyRef Name="LicenceIssueDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDetails_Vehicles">
          <End Type="Model.Vehicle" Role="Vehicle" Multiplicity="0..1" />
          <End Type="Model.LicenceIssueDetail" Role="LicenceIssueDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Vehicle">
              <PropertyRef Name="VehicleID" />
            </Principal>
            <Dependent Role="LicenceIssueDetail">
              <PropertyRef Name="VerifiedVehicleID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Licences_Vehicles">
          <End Type="Model.Vehicle" Role="Vehicle" Multiplicity="0..1" />
          <End Type="Model.Licence" Role="Licence" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Vehicle">
              <PropertyRef Name="VehicleID" />
            </Principal>
            <Dependent Role="Licence">
              <PropertyRef Name="VehicleID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="ApplicationRequestDetail">
          <Key>
            <PropertyRef Name="ApplicationRequestDetailID" />
          </Key>
          <Property Type="Int64" Name="ApplicationRequestDetailID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowInstanceID" />
          <Property Type="Int16" Name="ApplicationRequestTypeID" Nullable="false" />
          <Property Type="Int16" Name="SourceApplicationID" Nullable="false" />
          <Property Type="Int16" Name="ProvinceID" Nullable="false" />
          <Property Type="Int64" Name="GazetteDetailID" />
          <Property Type="Int64" Name="AdjudicationDetailID" />
          <Property Type="Int64" Name="PrecheckDetailID" />
          <Property Type="Int16" Name="PaymentTypeID" />
          <Property Type="Boolean" Name="IsRenewal" Nullable="false" />
          <Property Type="Boolean" Name="IsLateRenewal" Nullable="false" />
          <Property Type="Boolean" Name="IsNewAssociationRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsNewMemberRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsNewRouteRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsExceptionRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsUpliftmentRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsAdjustmentRequired" Nullable="false" />
          <Property Type="Boolean" Name="IsCancellationRequired" Nullable="false" />
          <Property Type="String" Name="Description" MaxLength="500" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="CreatedByID" Nullable="false" />
          <Property Type="DateTime" Name="CreatedDate" Nullable="false" Precision="3" />
          <Property Type="Int64" Name="UpdatedByID" Nullable="false" />
          <Property Type="DateTime" Name="UpdatedDate" Nullable="false" Precision="3" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="ApplicationVehicle" Relationship="Model.FK_ApplicationVehicleDetails_ApplicationRequestDetails" FromRole="ApplicationRequestDetail" ToRole="ApplicationVehicleDetail" />
          <NavigationProperty Name="LicenceIssueDetails" Relationship="Model.FK_LicenceIssueDetails_ApplicationRequestDetails1" FromRole="ApplicationRequestDetail" ToRole="LicenceIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Name="RegionID" Type="Int64" />
          <Property Name="AdjudicationDecisionID" Type="Int16" />
          <Property Name="AdjudicationLicenceDurationMonths" Type="Int32" />
          <Property Name="AdjudicationDecisionDate" Type="DateTime" Precision="3" />
          <Property Name="AdjudicationException" Type="Boolean" />
          <Property Name="AdjudicationLicenceExpiryDate" Type="DateTime" Precision="0" />
          <Property Name="IsAdjudicationBypassed" Type="Boolean" Nullable="false" />
          <Property Name="AdjudicationRegionID" Type="Int16" />
          <Property Name="IsGazettingBypassed" Type="Boolean" Nullable="false" />
          <Property Name="IsAssessorApprovalRequired" Type="Boolean" Nullable="false" />
          <Property Name="IsSeniorManagerApprovalRequired" Type="Boolean" Nullable="false" />
          <Property Name="HasNewRoute" Type="Boolean" Nullable="false" />
          <Property Name="IsAutoVerificationRequired" Type="Boolean" />
          <Property Name="IsLtpsConversion" Type="Boolean" />
          <Property Name="IsBulkVehicleApplication" Type="Boolean" Nullable="false" />
          <Property Name="VehicleCount" Type="Int32" Nullable="false" />
          <Property Name="IsBulkVehicleVerificationRequired" Type="Boolean" />
          <Property Name="AdjudicationCount" Type="Int32" />
        </EntityType>
        <EntityType Name="ApplicationVehicleDetail">
          <Key>
            <PropertyRef Name="ApplicationRequestDetailID" />
          </Key>
          <Property Type="Int64" Name="ApplicationRequestDetailID" Nullable="false" />
          <Property Type="Boolean" Name="IsStillToBeAcquired" Nullable="false" />
          <Property Type="Int16" Name="VehicleMakeID" />
          <Property Type="String" Name="VehicleMakeDescription" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="VehicleTypeID" />
          <Property Type="String" Name="VIN" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="EngineNumber" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="YearOfManufacture" MaxLength="4" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="VehicleRegistrationNumber" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="SeatedCapacity" />
          <Property Type="Int16" Name="StandingCapacity" />
          <Property Type="String" Name="RoadworthyCertificateNumber" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="RoadworthyCertificateDocID" />
          <Property Type="DateTime" Name="RoadworthyExpiryDate" Precision="3" />
          <Property Type="Int32" Name="GrossMass" />
          <Property Type="Int64" Name="VerifiedVehicleID" />
          <Property Type="Int64" Name="CarryingCapacityID" />
          <NavigationProperty Name="ApplicationRequestDetail" Relationship="Model.FK_ApplicationVehicleDetails_ApplicationRequestDetails" FromRole="ApplicationVehicleDetail" ToRole="ApplicationRequestDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Vehicle" Relationship="Model.FK_ApplicationVehicleDetails_Vehicles" FromRole="ApplicationVehicleDetail" ToRole="Vehicle" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_ApplicationVehicleDetails_ApplicationRequestDetails">
          <End Type="Model.ApplicationRequestDetail" Role="ApplicationRequestDetail" Multiplicity="1" />
          <End Type="Model.ApplicationVehicleDetail" Role="ApplicationVehicleDetail" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="ApplicationRequestDetail">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Principal>
            <Dependent Role="ApplicationVehicleDetail">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_LicenceIssueDetails_ApplicationRequestDetails1">
          <End Type="Model.ApplicationRequestDetail" Role="ApplicationRequestDetail" Multiplicity="1" />
          <End Type="Model.LicenceIssueDetail" Role="LicenceIssueDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="ApplicationRequestDetail">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Principal>
            <Dependent Role="LicenceIssueDetail">
              <PropertyRef Name="ApplicationRequestDetailID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ApplicationVehicleDetails_Vehicles">
          <End Type="Model.Vehicle" Role="Vehicle" Multiplicity="0..1" />
          <End Type="Model.ApplicationVehicleDetail" Role="ApplicationVehicleDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Vehicle">
              <PropertyRef Name="VehicleID" />
            </Principal>
            <Dependent Role="ApplicationVehicleDetail">
              <PropertyRef Name="VerifiedVehicleID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="LicenceException">
          <Documentation>
            <LongDescription>[ScriptIgnore]</LongDescription>
          </Documentation>
          <Key>
            <PropertyRef Name="LicenceExceptionID" />
          </Key>
          <Property Name="LicenceExceptionID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="LicenceID" Type="Int64" Nullable="false" />
          <Property Name="Exception" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="true" />
          <NavigationProperty Name="Licence" Relationship="Model.FK_LicenceExceptions_Licences" FromRole="LicenceException" ToRole="Licence" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_LicenceExceptions_Licences">
          <End Type="Model.Licence" Role="Licence" Multiplicity="1" />
          <End Type="Model.LicenceException" Role="LicenceException" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Licence">
              <PropertyRef Name="LicenceID" />
            </Principal>
            <Dependent Role="LicenceException">
              <PropertyRef Name="LicenceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
      </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="LicenceIssueModelStoreContainer" CdmEntityContainer="LicenceIssueContext">
        <EntitySetMapping Name="LicenceIssueDetails">
            <EntityTypeMapping TypeName="Model.LicenceIssueDetail">
              <MappingFragment StoreEntitySet="LicenceIssueDetails">
                <ScalarProperty Name="ApplicationVehicleDetailsInBulkID" ColumnName="ApplicationVehicleDetailsInBulkID" />
                <ScalarProperty Name="IsDocumentVerificationRequired" ColumnName="IsDocumentVerificationRequired" />
                <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="VerifiedVehicleID" ColumnName="VerifiedVehicleID" />
                <ScalarProperty Name="VerifiedLicenceID" ColumnName="VerifiedLicenceID" />
                <ScalarProperty Name="ApplicationRequestDetailID" ColumnName="ApplicationRequestDetailID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="LicenceIssueDetailID" ColumnName="LicenceIssueDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Licences">
            <EntityTypeMapping TypeName="Model.Licence">
              <MappingFragment StoreEntitySet="Licences">
                <ScalarProperty Name="ApplicationVehicleDetailsInBulkID" ColumnName="ApplicationVehicleDetailsInBulkID" />
                <ScalarProperty Name="IsLatestIssue" ColumnName="IsLatestIssue" />
                <ScalarProperty Name="OriginalOLASNumber" ColumnName="OriginalOLASNumber" />
                <ScalarProperty Name="OriginalLTPSPermitNumber" ColumnName="OriginalLTPSPermitNumber" />
                <ScalarProperty Name="UpliftmentReminderSmsSentDate" ColumnName="UpliftmentReminderSmsSentDate" />
                <ScalarProperty Name="ExpiredNotificationSmsSentDate" ColumnName="ExpiredNotificationSmsSentDate" />
                <ScalarProperty Name="UpcomingExpiryNotificationSmsSentDate" ColumnName="UpcomingExpiryNotificationSmsSentDate" />
                <ScalarProperty Name="Indefinite" ColumnName="Indefinite" />
                <ScalarProperty Name="DateOfExpiry" ColumnName="DateOfExpiry" />
                <ScalarProperty Name="DateOfIssue" ColumnName="DateOfIssue" />
                <ScalarProperty Name="CertificateNumber" ColumnName="CertificateNumber" />
                <ScalarProperty Name="IssueNumber" ColumnName="IssueNumber" />
                <ScalarProperty Name="OperatingLicenceNumber" ColumnName="OperatingLicenceNumber" />
                <ScalarProperty Name="NameOnLicence" ColumnName="NameOnLicence" />
                <ScalarProperty Name="ModeID" ColumnName="ModeID" />
                <ScalarProperty Name="VehicleID" ColumnName="VehicleID" />
                <ScalarProperty Name="MemberID" ColumnName="MemberID" />
                <ScalarProperty Name="LicenceStatusID" ColumnName="LicenceStatusID" />
                <ScalarProperty Name="ApplicationRequestDetailID" ColumnName="ApplicationRequestDetailID" />
                <ScalarProperty Name="LicenceID" ColumnName="LicenceID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vehicles">
            <EntityTypeMapping TypeName="Model.Vehicle">
              <MappingFragment StoreEntitySet="Vehicles">
                <ScalarProperty Name="IgnoreVinException" ColumnName="IgnoreVinException" />
                <ScalarProperty Name="CarryingCapacityID" ColumnName="CarryingCapacityID" />
                <ScalarProperty Name="YearOfManufacture" ColumnName="YearOfManufacture" />
                <ScalarProperty Name="NeoID" ColumnName="NeoID" />
                <ScalarProperty Name="LtpsID" ColumnName="LtpsID" />
                <ScalarProperty Name="OlasID" ColumnName="OlasID" />
                <ScalarProperty Name="VehicleStatusID" ColumnName="VehicleStatusID" />
                <ScalarProperty Name="VehicleTypeID" ColumnName="VehicleTypeID" />
                <ScalarProperty Name="VehicleMakeID" ColumnName="VehicleMakeID" />
                <ScalarProperty Name="GrossMass" ColumnName="GrossMass" />
                <ScalarProperty Name="StandingCapacity" ColumnName="StandingCapacity" />
                <ScalarProperty Name="SeatedCapacity" ColumnName="SeatedCapacity" />
                <ScalarProperty Name="VIN" ColumnName="VIN" />
                <ScalarProperty Name="EngineNumber" ColumnName="EngineNumber" />
                <ScalarProperty Name="RegistrationNumber" ColumnName="RegistrationNumber" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="VehicleID" ColumnName="VehicleID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="LicenceIssueDocuments">
            <EntityTypeMapping TypeName="Model.LicenceIssueDocument">
              <MappingFragment StoreEntitySet="LicenceIssueDocuments">
                <ScalarProperty Name="DocumentID" ColumnName="DocumentID" />
                <ScalarProperty Name="IsMandatory" ColumnName="IsMandatory" />
                <ScalarProperty Name="DocumentTypeID" ColumnName="DocumentTypeID" />
                <ScalarProperty Name="LicenceIssueDetailID" ColumnName="LicenceIssueDetailID" />
                <ScalarProperty Name="LicenceIssueDocumentID" ColumnName="LicenceIssueDocumentID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="DocumentTypes">
            <EntityTypeMapping TypeName="Model.DocumentType">
              <MappingFragment StoreEntitySet="DocumentTypes">
                <ScalarProperty Name="IsDocumentTitleEditable" ColumnName="IsDocumentTitleEditable" />
                <ScalarProperty Name="IsDocumentTemplate" ColumnName="IsDocumentTemplate" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="DocumentTypeID" ColumnName="DocumentTypeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Routes">
            <EntityTypeMapping TypeName="Model.Route">
              <MappingFragment StoreEntitySet="Routes">
                <ScalarProperty Name="IsPotentialIncorrectRouteChangeProbability" ColumnName="IsPotentialIncorrectRouteChangeProbability" />
                <ScalarProperty Name="IsPotentialIncorrectRouteChange" ColumnName="IsPotentialIncorrectRouteChange" />
                <ScalarProperty Name="IsChecked" ColumnName="IsChecked" />
                <ScalarProperty Name="FareScheduleDocumentID" ColumnName="FareScheduleDocumentID" />
                <ScalarProperty Name="TimeTableDocumentID" ColumnName="TimeTableDocumentID" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="NeoID" ColumnName="NeoID" />
                <ScalarProperty Name="LtpsID" ColumnName="LtpsID" />
                <ScalarProperty Name="OlasID" ColumnName="OlasID" />
                <ScalarProperty Name="RouteStatusID" ColumnName="RouteStatusID" />
                <ScalarProperty Name="RouteLength" ColumnName="RouteLength" />
                <ScalarProperty Name="BoardRouteNumber" ColumnName="BoardRouteNumber" />
                <ScalarProperty Name="NationalRouteNumber" ColumnName="NationalRouteNumber" />
                <ScalarProperty Name="DestinationPlaceID" ColumnName="DestinationPlaceID" />
                <ScalarProperty Name="OriginPlaceID" ColumnName="OriginPlaceID" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="RouteName" ColumnName="RouteName" />
                <ScalarProperty Name="RouteTypeID" ColumnName="RouteTypeID" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="RouteID" ColumnName="RouteID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <AssociationSetMapping Name="LicenceRoutes" TypeName="Model.LicenceRoutes" StoreEntitySet="LicenceRoutes">
            <EndProperty Name="Route">
              <ScalarProperty Name="RouteID" ColumnName="RouteID" />
            </EndProperty>
            <EndProperty Name="Licence">
              <ScalarProperty Name="LicenceID" ColumnName="LicenceID" />
            </EndProperty>
          </AssociationSetMapping>
          <EntitySetMapping Name="RouteTypes">
            <EntityTypeMapping TypeName="Model.RouteType">
              <MappingFragment StoreEntitySet="RouteTypes">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="RouteTypeID" ColumnName="RouteTypeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Members">
            <EntityTypeMapping TypeName="Model.Member">
              <MappingFragment StoreEntitySet="Members">
                <ScalarProperty Name="BusinessTypeID" ColumnName="BusinessTypeID" />
                <ScalarProperty Name="NeoID" ColumnName="NeoID" />
                <ScalarProperty Name="LtpsID" ColumnName="LtpsID" />
                <ScalarProperty Name="OlasID" ColumnName="OlasID" />
                <ScalarProperty Name="MemberStatusID" ColumnName="MemberStatusID" />
                <ScalarProperty Name="TradeName" ColumnName="TradeName" />
                <ScalarProperty Name="SARSReasonIfNoTaxNumber" ColumnName="SARSReasonIfNoTaxNumber" />
                <ScalarProperty Name="SARSIncomeTaxNumber" ColumnName="SARSIncomeTaxNumber" />
                <ScalarProperty Name="Email" ColumnName="Email" />
                <ScalarProperty Name="TelFax" ColumnName="TelFax" />
                <ScalarProperty Name="TelCell" ColumnName="TelCell" />
                <ScalarProperty Name="TelPhone" ColumnName="TelPhone" />
                <ScalarProperty Name="PhysicalAddressCode" ColumnName="PhysicalAddressCode" />
                <ScalarProperty Name="PhysicalAddress" ColumnName="PhysicalAddress" />
                <ScalarProperty Name="PostalAddressCode" ColumnName="PostalAddressCode" />
                <ScalarProperty Name="PostalAddress" ColumnName="PostalAddress" />
                <ScalarProperty Name="IDNumberOrBusinessRegistrationNo" ColumnName="IDNumberOrBusinessRegistrationNo" />
                <ScalarProperty Name="IDTypeDescription" ColumnName="IDTypeDescription" />
                <ScalarProperty Name="IDTypeID" ColumnName="IDTypeID" />
                <ScalarProperty Name="FirstNames" ColumnName="FirstNames" />
                <ScalarProperty Name="SurnameOrCompanyName" ColumnName="SurnameOrCompanyName" />
                <ScalarProperty Name="TaxClearanceCertificateDocID" ColumnName="TaxClearanceCertificateDocID" />
                <ScalarProperty Name="IdentityDocumentDocID" ColumnName="IdentityDocumentDocID" />
                <ScalarProperty Name="FullName" ColumnName="FullName" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="MemberID" ColumnName="MemberID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Places">
            <EntityTypeMapping TypeName="Model.Place">
              <MappingFragment StoreEntitySet="Places">
                <ScalarProperty Name="NeoID" ColumnName="NeoID" />
                <ScalarProperty Name="LtpsID" ColumnName="LtpsID" />
                <ScalarProperty Name="OlasID" ColumnName="OlasID" />
                <ScalarProperty Name="PlaceStatusID" ColumnName="PlaceStatusID" />
                <ScalarProperty Name="PlaceTypeID" ColumnName="PlaceTypeID" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="PlaceID" ColumnName="PlaceID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="LicenceIssueInspectionDetails">
            <EntityTypeMapping TypeName="Model.LicenceIssueInspectionDetail">
              <MappingFragment StoreEntitySet="LicenceIssueInspectionDetails">
                <ScalarProperty Name="Additional2DocumentID" ColumnName="Additional2DocumentID" />
                <ScalarProperty Name="Additional1DocumentID" ColumnName="Additional1DocumentID" />
                <ScalarProperty Name="BackRegDocumentID" ColumnName="BackRegDocumentID" />
                <ScalarProperty Name="EngineDocumentID" ColumnName="EngineDocumentID" />
                <ScalarProperty Name="ChassisDocumentID" ColumnName="ChassisDocumentID" />
                <ScalarProperty Name="FrontRegDocumentID" ColumnName="FrontRegDocumentID" />
                <ScalarProperty Name="InspectionSheetDocumentID" ColumnName="InspectionSheetDocumentID" />
                <ScalarProperty Name="ChassisNumber" ColumnName="ChassisNumber" />
                <ScalarProperty Name="EngineNumber" ColumnName="EngineNumber" />
                <ScalarProperty Name="DateInspected" ColumnName="DateInspected" />
                <ScalarProperty Name="InspectedByID" ColumnName="InspectedByID" />
                <ScalarProperty Name="LicenceIssueInspectionOutcomeID" ColumnName="LicenceIssueInspectionOutcomeID" />
                <ScalarProperty Name="LicenceIssueDetailID" ColumnName="LicenceIssueDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="ApplicationRequestDetails">
            <EntityTypeMapping TypeName="Model.ApplicationRequestDetail">
              <MappingFragment StoreEntitySet="ApplicationRequestDetails">
                <ScalarProperty Name="AdjudicationCount" ColumnName="AdjudicationCount" />
                <ScalarProperty Name="IsBulkVehicleVerificationRequired" ColumnName="IsBulkVehicleVerificationRequired" />
                <ScalarProperty Name="VehicleCount" ColumnName="VehicleCount" />
                <ScalarProperty Name="IsBulkVehicleApplication" ColumnName="IsBulkVehicleApplication" />
                <ScalarProperty Name="IsLtpsConversion" ColumnName="IsLtpsConversion" />
                <ScalarProperty Name="IsAutoVerificationRequired" ColumnName="IsAutoVerificationRequired" />
                <ScalarProperty Name="HasNewRoute" ColumnName="HasNewRoute" />
                <ScalarProperty Name="IsSeniorManagerApprovalRequired" ColumnName="IsSeniorManagerApprovalRequired" />
                <ScalarProperty Name="IsAssessorApprovalRequired" ColumnName="IsAssessorApprovalRequired" />
                <ScalarProperty Name="IsGazettingBypassed" ColumnName="IsGazettingBypassed" />
                <ScalarProperty Name="AdjudicationRegionID" ColumnName="AdjudicationRegionID" />
                <ScalarProperty Name="IsAdjudicationBypassed" ColumnName="IsAdjudicationBypassed" />
                <ScalarProperty Name="AdjudicationLicenceExpiryDate" ColumnName="AdjudicationLicenceExpiryDate" />
                <ScalarProperty Name="AdjudicationException" ColumnName="AdjudicationException" />
                <ScalarProperty Name="AdjudicationDecisionDate" ColumnName="AdjudicationDecisionDate" />
                <ScalarProperty Name="AdjudicationLicenceDurationMonths" ColumnName="AdjudicationLicenceDurationMonths" />
                <ScalarProperty Name="AdjudicationDecisionID" ColumnName="AdjudicationDecisionID" />
                <ScalarProperty Name="RegionID" ColumnName="RegionID" />
                <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="Description" ColumnName="Description" />
                <ScalarProperty Name="IsCancellationRequired" ColumnName="IsCancellationRequired" />
                <ScalarProperty Name="IsAdjustmentRequired" ColumnName="IsAdjustmentRequired" />
                <ScalarProperty Name="IsUpliftmentRequired" ColumnName="IsUpliftmentRequired" />
                <ScalarProperty Name="IsExceptionRequired" ColumnName="IsExceptionRequired" />
                <ScalarProperty Name="IsNewRouteRequired" ColumnName="IsNewRouteRequired" />
                <ScalarProperty Name="IsNewMemberRequired" ColumnName="IsNewMemberRequired" />
                <ScalarProperty Name="IsNewAssociationRequired" ColumnName="IsNewAssociationRequired" />
                <ScalarProperty Name="IsLateRenewal" ColumnName="IsLateRenewal" />
                <ScalarProperty Name="IsRenewal" ColumnName="IsRenewal" />
                <ScalarProperty Name="PaymentTypeID" ColumnName="PaymentTypeID" />
                <ScalarProperty Name="PrecheckDetailID" ColumnName="PrecheckDetailID" />
                <ScalarProperty Name="AdjudicationDetailID" ColumnName="AdjudicationDetailID" />
                <ScalarProperty Name="GazetteDetailID" ColumnName="GazetteDetailID" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="SourceApplicationID" ColumnName="SourceApplicationID" />
                <ScalarProperty Name="ApplicationRequestTypeID" ColumnName="ApplicationRequestTypeID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="ApplicationRequestDetailID" ColumnName="ApplicationRequestDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="ApplicationVehicleDetails">
            <EntityTypeMapping TypeName="Model.ApplicationVehicleDetail">
              <MappingFragment StoreEntitySet="ApplicationVehicleDetails">
                <ScalarProperty Name="CarryingCapacityID" ColumnName="CarryingCapacityID" />
                <ScalarProperty Name="VerifiedVehicleID" ColumnName="VerifiedVehicleID" />
                <ScalarProperty Name="GrossMass" ColumnName="GrossMass" />
                <ScalarProperty Name="RoadworthyExpiryDate" ColumnName="RoadworthyExpiryDate" />
                <ScalarProperty Name="RoadworthyCertificateDocID" ColumnName="RoadworthyCertificateDocID" />
                <ScalarProperty Name="RoadworthyCertificateNumber" ColumnName="RoadworthyCertificateNumber" />
                <ScalarProperty Name="StandingCapacity" ColumnName="StandingCapacity" />
                <ScalarProperty Name="SeatedCapacity" ColumnName="SeatedCapacity" />
                <ScalarProperty Name="VehicleRegistrationNumber" ColumnName="VehicleRegistrationNumber" />
                <ScalarProperty Name="YearOfManufacture" ColumnName="YearOfManufacture" />
                <ScalarProperty Name="EngineNumber" ColumnName="EngineNumber" />
                <ScalarProperty Name="VIN" ColumnName="VIN" />
                <ScalarProperty Name="VehicleTypeID" ColumnName="VehicleTypeID" />
                <ScalarProperty Name="VehicleMakeDescription" ColumnName="VehicleMakeDescription" />
                <ScalarProperty Name="VehicleMakeID" ColumnName="VehicleMakeID" />
                <ScalarProperty Name="IsStillToBeAcquired" ColumnName="IsStillToBeAcquired" />
                <ScalarProperty Name="ApplicationRequestDetailID" ColumnName="ApplicationRequestDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_LicenceIssuePostSaveProcess" FunctionName="LicenceIssueModel.Store.Pr_LicenceIssuePostSaveProcess" />
          <FunctionImportMapping FunctionImportName="Pr_VehicleGetLinkedByVIN" FunctionName="LicenceIssueModel.Store.Pr_VehicleGetLinkedByVIN" />
          <EntitySetMapping Name="LicenceExceptions">
            <EntityTypeMapping TypeName="Model.LicenceException">
              <MappingFragment StoreEntitySet="LicenceExceptions">
                <ScalarProperty Name="Exception" ColumnName="Exception" />
                <ScalarProperty Name="LicenceID" ColumnName="LicenceID" />
                <ScalarProperty Name="LicenceExceptionID" ColumnName="LicenceExceptionID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_LicenceExceptionsUpdate" FunctionName="LicenceIssueModel.Store.Pr_LicenceExceptionsUpdate" />
          <FunctionImportMapping FunctionImportName="Pr_LicenceIssueCheckSecurity" FunctionName="LicenceIssueModel.Store.Pr_LicenceIssueCheckSecurity" />
          <FunctionImportMapping FunctionImportName="Pr_CleanseUnusedVehicleData" FunctionName="LicenceIssueModel.Store.Pr_CleanseUnusedVehicleData" />
        </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="True" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams>
      <Diagram Name="LicenceIssueModel" ZoomLevel="74">
        <EntityTypeShape EntityType="Model.LicenceIssueDetail" Width="1.5" PointX="3" PointY="3.875" />
        <EntityTypeShape EntityType="Model.Licence" Width="1.5" PointX="6" PointY="3.5" />
        <EntityTypeShape EntityType="Model.Vehicle" Width="1.5" PointX="0.75" PointY="3.75" />
        <AssociationConnector Association="Model.FK_LicenceIssueDetails_Licences" />
        <EntityTypeShape EntityType="Model.LicenceIssueDocument" Width="1.5" PointX="8.25" PointY="4.5" />
        <AssociationConnector Association="Model.FK_LicenceIssueDocuments_LicenceIssueDetails" />
        <EntityTypeShape EntityType="Model.DocumentType" Width="1.5" PointX="6" PointY="0.75" />
        <AssociationConnector Association="Model.FK_LicenceIssueDocuments_DocumentTypes" />
        <EntityTypeShape EntityType="Model.Route" Width="1.5" PointX="11.25" PointY="3.5" />
        <AssociationConnector Association="Model.LicenceRoutes" />
        <EntityTypeShape EntityType="Model.RouteType" Width="1.5" PointX="9" PointY="1.125" />
        <AssociationConnector Association="Model.FK_Routes_RouteTypes" />
        <EntityTypeShape EntityType="Model.Member" Width="2.75" PointX="2" PointY="10" />
        <AssociationConnector Association="Model.FK_Licences_Members" />
        <EntityTypeShape EntityType="Model.Place" Width="1.5" PointX="9" PointY="7.625" />
        <AssociationConnector Association="Model.FK_Routes_DestinationPlace" />
        <AssociationConnector Association="Model.FK_Routes_OriginPlace" />
        <EntityTypeShape EntityType="Model.LicenceIssueInspectionDetail" Width="1.5" PointX="12.375" PointY="9.5" />
        <AssociationConnector Association="Model.FK_LicenceIssueInspectionDetails_LicenceIssueDetails" />
        <AssociationConnector Association="Model.FK_LicenceIssueDetails_Vehicles" />
        <AssociationConnector Association="Model.FK_Licences_Vehicles" />
        <EntityTypeShape EntityType="Model.ApplicationRequestDetail" Width="2.375" PointX="8.25" PointY="16" />
        <EntityTypeShape EntityType="Model.ApplicationVehicleDetail" Width="1.5" PointX="11.75" PointY="17.625" />
        <AssociationConnector Association="Model.FK_ApplicationVehicleDetails_ApplicationRequestDetails" />
        <AssociationConnector Association="Model.FK_LicenceIssueDetails_ApplicationRequestDetails1" />
        <AssociationConnector Association="Model.FK_ApplicationVehicleDetails_Vehicles" />
        <EntityTypeShape EntityType="Model.LicenceException" Width="1.5" PointX="8.25" PointY="11.125" />
        <AssociationConnector Association="Model.FK_LicenceExceptions_Licences" />
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>