﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
    <Schema Namespace="ApplicationModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="AccreditationIssueDetails">
          <Key>
            <PropertyRef Name="AccreditationIssueDetailID" />
          </Key>
          <Property Name="AccreditationIssueDetailID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="ApplicationDetailID" Type="bigint" Nullable="false" />
          <Property Name="VerifiedAccreditationID" Type="bigint" Nullable="false" />
          <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" />
        </EntityType>
        <EntityType Name="AccreditationExceptions">
          <Key>
            <PropertyRef Name="AccreditationExceptionID" />
          </Key>
          <Property Name="AccreditationExceptionID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="AccreditationID" Type="bigint" Nullable="false" />
          <Property Name="Exception" Type="nvarchar" MaxLength="255" Nullable="false" />
        </EntityType>
        <EntityType Name="Accreditations">
          <Key>
            <PropertyRef Name="AccreditationID" />
          </Key>
          <Property Name="AccreditationID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ApplicationDetailID" Type="bigint" Nullable="false" />
          <Property Name="AccreditationStatusID" Type="smallint" Nullable="false" />
          <Property Name="MemberID" Type="bigint" Nullable="false" />
          <Property Name="ProvinceID" Type="smallint" />
          <Property Name="NameOnAccreditation" Type="varchar" MaxLength="100" />
          <Property Name="AccreditationNumber" Type="varchar" MaxLength="25" />
          <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="UpcomingExpiryNotificationSmsSentDate" Type="datetime" />
          <Property Name="ExpiredNotificationSmsSentDate" Type="datetime" />
          <Property Name="NumberOfLicencesAllowed" Type="int" Nullable="false" />
          <Property Name="IsLatestIssue" Type="bit" Nullable="false" />
        </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="RegionID" Type="bigint" />
          <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="50" />
          <Property Name="PostalAddress" Type="varchar" MaxLength="800" />
          <Property Name="PostalAddressCode" Type="varchar" MaxLength="20" />
          <Property Name="PhysicalAddress" Type="varchar" MaxLength="800" />
          <Property Name="PhysicalAddressCode" Type="varchar" MaxLength="20" />
          <Property Name="TelPhone" Type="varchar" MaxLength="255" />
          <Property Name="TelCell" Type="varchar" MaxLength="255" />
          <Property Name="TelFax" Type="varchar" MaxLength="255" />
          <Property Name="Email" Type="varchar" MaxLength="255" />
          <Property Name="SARSIncomeTaxNumber" Type="varchar" MaxLength="50" />
          <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>
        <!--Errors Found During Generation:
warning 6002: The table/view 'LegitimateNATIONAL.App.Vw_AccreditationIssueDetails' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_AccreditationIssueDetails">
          <Key>
            <PropertyRef Name="AccreditationIssueDetailID" />
            <PropertyRef Name="ApplicationDetailID" />
            <PropertyRef Name="VerifiedAccreditationID" />
            <PropertyRef Name="LicenceReferenceNumber" />
            <PropertyRef Name="RequestType" />
            <PropertyRef Name="ApplicationRequestTypeID" />
            <PropertyRef Name="MemberFullName" />
            <PropertyRef Name="Association" />
            <PropertyRef Name="ApplicationReferenceNumber" />
          </Key>
          <Property Name="AccreditationIssueDetailID" Type="bigint" Nullable="false" />
          <Property Name="ApplicationDetailID" Type="bigint" Nullable="false" />
          <Property Name="VerifiedAccreditationID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" />
          <Property Name="LicenceReferenceNumber" Type="varchar" MaxLength="20" Nullable="false" />
          <Property Name="ApplicationReferenceNumber" Type="varchar" MaxLength="20" Nullable="false" />
          <Property Name="RequestType" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="SurnameOrCompanyName" Type="varchar" MaxLength="255" />
          <Property Name="ApplicationDescription" Type="varchar" MaxLength="255" />
          <Property Name="CertificateNumber" Type="varchar" MaxLength="100" />
          <Property Name="IsStillToBeAcquired" Type="bit" />
          <Property Name="ApplicationRequestTypeID" Type="smallint" Nullable="false" />
          <Property Name="MemberFullName" Type="varchar" MaxLength="511" Nullable="false" />
          <Property Name="MemberTaxReference" Type="varchar" MaxLength="50" />
          <Property Name="MemberIDNumber" Type="bigint" />
          <Property Name="MemberCell" Type="varchar" MaxLength="255" />
          <Property Name="Association" Type="varchar" MaxLength="255" Nullable="false" />
        </EntityType>
        <Association Name="FK_AccreditationExceptions_Accreditations">
          <End Role="Accreditations" Type="Self.Accreditations" Multiplicity="1" />
          <End Role="AccreditationExceptions" Type="Self.AccreditationExceptions" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Accreditations">
              <PropertyRef Name="AccreditationID" />
            </Principal>
            <Dependent Role="AccreditationExceptions">
              <PropertyRef Name="AccreditationID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_AccreditationIssueDetails_Accreditations">
          <End Role="Accreditations" Type="Self.Accreditations" Multiplicity="1" />
          <End Role="AccreditationIssueDetails" Type="Self.AccreditationIssueDetails" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Accreditations">
              <PropertyRef Name="AccreditationID" />
            </Principal>
            <Dependent Role="AccreditationIssueDetails">
              <PropertyRef Name="VerifiedAccreditationID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Accreditations_Members">
          <End Role="Members" Type="Self.Members" Multiplicity="1" />
          <End Role="Accreditations" Type="Self.Accreditations" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Members">
              <PropertyRef Name="MemberID" />
            </Principal>
            <Dependent Role="Accreditations">
              <PropertyRef Name="MemberID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="App">
          <Parameter Name="AccreditationIssueDetailID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_AccreditationExceptionsUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Verified">
          <Parameter Name="AccreditationID" Type="bigint" Mode="In" />
        </Function>
        <EntityContainer Name="ApplicationModelStoreContainer">
          <EntitySet Name="AccreditationIssueDetails" EntityType="Self.AccreditationIssueDetails" Schema="App" store:Type="Tables" />
          <EntitySet Name="AccreditationExceptions" EntityType="Self.AccreditationExceptions" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Accreditations" EntityType="Self.Accreditations" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Members" EntityType="Self.Members" Schema="Verified" store:Type="Tables" />
          <EntitySet Name="Vw_AccreditationIssueDetails" EntityType="Self.Vw_AccreditationIssueDetails" store:Type="Views" store:Schema="App">
            <DefiningQuery>SELECT 
    [Vw_AccreditationIssueDetails].[AccreditationIssueDetailID] AS [AccreditationIssueDetailID], 
    [Vw_AccreditationIssueDetails].[ApplicationDetailID] AS [ApplicationDetailID], 
    [Vw_AccreditationIssueDetails].[VerifiedAccreditationID] AS [VerifiedAccreditationID], 
    [Vw_AccreditationIssueDetails].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_AccreditationIssueDetails].[LicenceReferenceNumber] AS [LicenceReferenceNumber], 
    [Vw_AccreditationIssueDetails].[ApplicationReferenceNumber] AS [ApplicationReferenceNumber], 
    [Vw_AccreditationIssueDetails].[RequestType] AS [RequestType], 
    [Vw_AccreditationIssueDetails].[SurnameOrCompanyName] AS [SurnameOrCompanyName], 
    [Vw_AccreditationIssueDetails].[ApplicationDescription] AS [ApplicationDescription], 
    [Vw_AccreditationIssueDetails].[CertificateNumber] AS [CertificateNumber], 
    [Vw_AccreditationIssueDetails].[IsStillToBeAcquired] AS [IsStillToBeAcquired], 
    [Vw_AccreditationIssueDetails].[ApplicationRequestTypeID] AS [ApplicationRequestTypeID], 
    [Vw_AccreditationIssueDetails].[MemberFullName] AS [MemberFullName], 
    [Vw_AccreditationIssueDetails].[MemberTaxReference] AS [MemberTaxReference], 
    [Vw_AccreditationIssueDetails].[MemberIDNumber] AS [MemberIDNumber], 
    [Vw_AccreditationIssueDetails].[MemberCell] AS [MemberCell], 
    [Vw_AccreditationIssueDetails].[Association] AS [Association]
    FROM [App].[Vw_AccreditationIssueDetails] AS [Vw_AccreditationIssueDetails]</DefiningQuery>
          </EntitySet>
          <AssociationSet Name="FK_AccreditationExceptions_Accreditations" Association="Self.FK_AccreditationExceptions_Accreditations">
            <End Role="Accreditations" EntitySet="Accreditations" />
            <End Role="AccreditationExceptions" EntitySet="AccreditationExceptions" />
          </AssociationSet>
          <AssociationSet Name="FK_AccreditationIssueDetails_Accreditations" Association="Self.FK_AccreditationIssueDetails_Accreditations">
            <End Role="Accreditations" EntitySet="Accreditations" />
            <End Role="AccreditationIssueDetails" EntitySet="AccreditationIssueDetails" />
          </AssociationSet>
          <AssociationSet Name="FK_Accreditations_Members" Association="Self.FK_Accreditations_Members">
            <End Role="Members" EntitySet="Members" />
            <End Role="Accreditations" EntitySet="Accreditations" />
          </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="AccreditationIssueContext" annotation:LazyLoadingEnabled="false">
          <EntitySet Name="Vw_AccreditationIssueDetails" EntityType="Model.Vw_AccreditationIssueDetails" />
          <EntitySet Name="AccreditationIssueDetails" EntityType="Model.AccreditationIssueDetail" />
          <EntitySet Name="Accreditations" EntityType="Model.Accreditation" />
          <AssociationSet Name="FK_AccreditationIssueDetails_Accreditations" Association="Model.FK_AccreditationIssueDetails_Accreditations">
            <End Role="Accreditation" EntitySet="Accreditations" />
            <End Role="AccreditationIssueDetail" EntitySet="AccreditationIssueDetails" />
          </AssociationSet>
          <EntitySet Name="Members" EntityType="Model.Member" />
          <AssociationSet Name="FK_Accreditations_Members" Association="Model.FK_Accreditations_Members">
            <End Role="Member" EntitySet="Members" />
            <End Role="Accreditation" EntitySet="Accreditations" />
          </AssociationSet>
          <FunctionImport Name="Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet" ReturnType="Collection(Model.Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet_Result)">
            <Parameter Name="AccreditationIssueDetailID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <EntitySet Name="AccreditationExceptions" EntityType="Model.AccreditationException" />
          <AssociationSet Name="FK_AccreditationExceptions_Accreditations" Association="Model.FK_AccreditationExceptions_Accreditations">
            <End Role="Accreditation" EntitySet="Accreditations" />
            <End Role="AccreditationException" EntitySet="AccreditationExceptions" />
          </AssociationSet>
          <FunctionImport Name="Pr_AccreditationExceptionsUpdate">
            <Parameter Name="AccreditationID" Mode="In" Type="Int64" />
          </FunctionImport>
        </EntityContainer>
        <EntityType Name="Vw_AccreditationIssueDetails">
          <Key>
            <PropertyRef Name="AccreditationIssueDetailID" />
            <PropertyRef Name="ApplicationDetailID" />
            <PropertyRef Name="VerifiedAccreditationID" />
            <PropertyRef Name="LicenceReferenceNumber" />
            <PropertyRef Name="ApplicationReferenceNumber" />
            <PropertyRef Name="RequestType" />
            <PropertyRef Name="ApplicationRequestTypeID" />
            <PropertyRef Name="MemberFullName" />
            <PropertyRef Name="Association" />
          </Key>
          <Property Name="AccreditationIssueDetailID" Type="Int64" Nullable="false" />
          <Property Name="ApplicationDetailID" Type="Int64" Nullable="false" />
          <Property Name="VerifiedAccreditationID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="Int64" />
          <Property Name="LicenceReferenceNumber" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="ApplicationReferenceNumber" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="RequestType" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="SurnameOrCompanyName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="ApplicationDescription" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="CertificateNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="IsStillToBeAcquired" Type="Boolean" />
          <Property Name="ApplicationRequestTypeID" Type="Int16" Nullable="false" />
          <Property Name="MemberFullName" Type="String" Nullable="false" MaxLength="511" FixedLength="false" Unicode="false" />
          <Property Name="MemberTaxReference" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="MemberIDNumber" Type="Int64" />
          <Property Name="MemberCell" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="Association" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="AccreditationIssueDetail">
          <Key>
            <PropertyRef Name="AccreditationIssueDetailID" />
          </Key>
          <Property Name="AccreditationIssueDetailID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowInstanceID" Type="Int64" />
          <Property Name="ApplicationDetailID" Type="Int64" Nullable="false" />
          <Property Name="VerifiedAccreditationID" Type="Int64" Nullable="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <Property Name="IsDocumentVerificationRequired" Type="Boolean" />
          <NavigationProperty Name="Accreditation" Relationship="Model.FK_AccreditationIssueDetails_Accreditations" FromRole="AccreditationIssueDetail" ToRole="Accreditation" />
        </EntityType>
        <EntityType Name="Accreditation">
          <Key>
            <PropertyRef Name="AccreditationID" />
          </Key>
          <Property Name="AccreditationID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ApplicationDetailID" Type="Int64" Nullable="false" />
          <Property Name="AccreditationStatusID" Type="Int16" Nullable="false" />
          <Property Name="MemberID" Type="Int64" Nullable="false" />
          <Property Name="ProvinceID" Type="Int16" />
          <Property Name="NameOnAccreditation" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="AccreditationNumber" Type="String" MaxLength="25" FixedLength="false" Unicode="false" />
          <Property Name="IssueNumber" Type="Int32" Nullable="false" />
          <Property Name="CertificateNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="DateOfIssue" Type="DateTime" Precision="3" />
          <Property Name="DateOfExpiry" Type="DateTime" Precision="3" />
          <Property Name="UpcomingExpiryNotificationSmsSentDate" Type="DateTime" Precision="3" />
          <Property Name="ExpiredNotificationSmsSentDate" Type="DateTime" Precision="3" />
          <Property Name="NumberOfLicencesAllowed" Type="Int32" Nullable="false" />
          <NavigationProperty Name="AccreditationIssueDetails" Relationship="Model.FK_AccreditationIssueDetails_Accreditations" FromRole="Accreditation" ToRole="AccreditationIssueDetail" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Member" Relationship="Model.FK_Accreditations_Members" FromRole="Accreditation" ToRole="Member" />
          <Property Name="IsLatestIssue" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="AccreditationExceptions" Relationship="Model.FK_AccreditationExceptions_Accreditations" FromRole="Accreditation" ToRole="AccreditationException" />
        </EntityType>
        <Association Name="FK_AccreditationIssueDetails_Accreditations">
          <End Type="Model.Accreditation" Role="Accreditation" Multiplicity="1" />
          <End Type="Model.AccreditationIssueDetail" Role="AccreditationIssueDetail" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Accreditation">
              <PropertyRef Name="AccreditationID" />
            </Principal>
            <Dependent Role="AccreditationIssueDetail">
              <PropertyRef Name="VerifiedAccreditationID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Member">
          <Key>
            <PropertyRef Name="MemberID" />
          </Key>
          <Property Name="MemberID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ReferenceNumber" Type="String" MaxLength="53" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Name="FullName" Type="String" Nullable="false" MaxLength="511" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Name="IdentityDocumentDocID" Type="Int64" />
          <Property Name="TaxClearanceCertificateDocID" Type="Int64" />
          <Property Name="SurnameOrCompanyName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="FirstNames" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="IDTypeID" Type="Int16" />
          <Property Name="IDTypeDescription" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="IDNumberOrBusinessRegistrationNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="PostalAddress" Type="String" MaxLength="800" FixedLength="false" Unicode="false" />
          <Property Name="PostalAddressCode" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="PhysicalAddress" Type="String" MaxLength="800" FixedLength="false" Unicode="false" />
          <Property Name="PhysicalAddressCode" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
          <Property Name="TelPhone" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="TelCell" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="TelFax" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="SARSIncomeTaxNumber" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="TradeName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="MemberStatusID" Type="Int16" Nullable="false" />
          <Property Name="OlasID" Type="Int64" />
          <Property Name="LtpsID" Type="Int64" />
          <Property Name="NeoID" Type="Int64" />
          <Property Name="BusinessTypeID" Type="Int64" />
          <NavigationProperty Name="Accreditations" Relationship="Model.FK_Accreditations_Members" FromRole="Member" ToRole="Accreditation" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Name="RegionID" Type="Int64" />
        </EntityType>
        <Association Name="FK_Accreditations_Members">
          <End Type="Model.Member" Role="Member" Multiplicity="1" />
          <End Type="Model.Accreditation" Role="Accreditation" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Member">
              <PropertyRef Name="MemberID" />
            </Principal>
            <Dependent Role="Accreditation">
              <PropertyRef Name="MemberID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <ComplexType Name="Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet_Result">
          <Property Type="String" Name="Title" Nullable="true" MaxLength="255" />
          <Property Type="String" Name="Status" Nullable="true" MaxLength="50" />
          <Property Type="String" Name="StatusDetail" Nullable="true" MaxLength="2000" />
          <Property Type="Int32" Name="OrderBy" Nullable="true" />
        </ComplexType>
        <EntityType Name="AccreditationException">
          <Key>
            <PropertyRef Name="AccreditationExceptionID" />
          </Key>
          <Property Name="AccreditationExceptionID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="AccreditationID" Type="Int64" Nullable="false" />
          <Property Name="Exception" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="true" />
          <NavigationProperty Name="Accreditation" Relationship="Model.FK_AccreditationExceptions_Accreditations" FromRole="AccreditationException" ToRole="Accreditation" />
        </EntityType>
        <Association Name="FK_AccreditationExceptions_Accreditations">
          <End Type="Model.Accreditation" Role="Accreditation" Multiplicity="1" />
          <End Type="Model.AccreditationException" Role="AccreditationException" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Accreditation">
              <PropertyRef Name="AccreditationID" />
            </Principal>
            <Dependent Role="AccreditationException">
              <PropertyRef Name="AccreditationID" />
            </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="ApplicationModelStoreContainer" CdmEntityContainer="AccreditationIssueContext">
          <EntitySetMapping Name="Vw_AccreditationIssueDetails">
            <EntityTypeMapping TypeName="Model.Vw_AccreditationIssueDetails">
              <MappingFragment StoreEntitySet="Vw_AccreditationIssueDetails">
                <ScalarProperty Name="Association" ColumnName="Association" />
                <ScalarProperty Name="MemberCell" ColumnName="MemberCell" />
                <ScalarProperty Name="MemberIDNumber" ColumnName="MemberIDNumber" />
                <ScalarProperty Name="MemberTaxReference" ColumnName="MemberTaxReference" />
                <ScalarProperty Name="MemberFullName" ColumnName="MemberFullName" />
                <ScalarProperty Name="ApplicationRequestTypeID" ColumnName="ApplicationRequestTypeID" />
                <ScalarProperty Name="IsStillToBeAcquired" ColumnName="IsStillToBeAcquired" />
                <ScalarProperty Name="CertificateNumber" ColumnName="CertificateNumber" />
                <ScalarProperty Name="ApplicationDescription" ColumnName="ApplicationDescription" />
                <ScalarProperty Name="SurnameOrCompanyName" ColumnName="SurnameOrCompanyName" />
                <ScalarProperty Name="RequestType" ColumnName="RequestType" />
                <ScalarProperty Name="ApplicationReferenceNumber" ColumnName="ApplicationReferenceNumber" />
                <ScalarProperty Name="LicenceReferenceNumber" ColumnName="LicenceReferenceNumber" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="VerifiedAccreditationID" ColumnName="VerifiedAccreditationID" />
                <ScalarProperty Name="ApplicationDetailID" ColumnName="ApplicationDetailID" />
                <ScalarProperty Name="AccreditationIssueDetailID" ColumnName="AccreditationIssueDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="AccreditationIssueDetails">
            <EntityTypeMapping TypeName="Model.AccreditationIssueDetail">
              <MappingFragment StoreEntitySet="AccreditationIssueDetails">
                <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="VerifiedAccreditationID" ColumnName="VerifiedAccreditationID" />
                <ScalarProperty Name="ApplicationDetailID" ColumnName="ApplicationDetailID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="AccreditationIssueDetailID" ColumnName="AccreditationIssueDetailID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Accreditations">
            <EntityTypeMapping TypeName="Model.Accreditation">
              <MappingFragment StoreEntitySet="Accreditations">
                <ScalarProperty Name="IsLatestIssue" ColumnName="IsLatestIssue" />
                <ScalarProperty Name="NumberOfLicencesAllowed" ColumnName="NumberOfLicencesAllowed" />
                <ScalarProperty Name="ExpiredNotificationSmsSentDate" ColumnName="ExpiredNotificationSmsSentDate" />
                <ScalarProperty Name="UpcomingExpiryNotificationSmsSentDate" ColumnName="UpcomingExpiryNotificationSmsSentDate" />
                <ScalarProperty Name="DateOfExpiry" ColumnName="DateOfExpiry" />
                <ScalarProperty Name="DateOfIssue" ColumnName="DateOfIssue" />
                <ScalarProperty Name="CertificateNumber" ColumnName="CertificateNumber" />
                <ScalarProperty Name="IssueNumber" ColumnName="IssueNumber" />
                <ScalarProperty Name="AccreditationNumber" ColumnName="AccreditationNumber" />
                <ScalarProperty Name="NameOnAccreditation" ColumnName="NameOnAccreditation" />
                <ScalarProperty Name="ProvinceID" ColumnName="ProvinceID" />
                <ScalarProperty Name="MemberID" ColumnName="MemberID" />
                <ScalarProperty Name="AccreditationStatusID" ColumnName="AccreditationStatusID" />
                <ScalarProperty Name="ApplicationDetailID" ColumnName="ApplicationDetailID" />
                <ScalarProperty Name="AccreditationID" ColumnName="AccreditationID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Members">
            <EntityTypeMapping TypeName="Model.Member">
              <MappingFragment StoreEntitySet="Members">
                <ScalarProperty Name="RegionID" ColumnName="RegionID" />
                <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="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>
          <FunctionImportMapping FunctionImportName="Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet" FunctionName="ApplicationModel.Store.Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_Dashboard_AccreditationIssuingWorkflowSummaryGet_Result">
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="Status" ColumnName="Status" />
                <ScalarProperty Name="StatusDetail" ColumnName="StatusDetail" />
                <ScalarProperty Name="OrderBy" ColumnName="OrderBy" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <EntitySetMapping Name="AccreditationExceptions">
            <EntityTypeMapping TypeName="Model.AccreditationException">
              <MappingFragment StoreEntitySet="AccreditationExceptions">
                <ScalarProperty Name="Exception" ColumnName="Exception" />
                <ScalarProperty Name="AccreditationID" ColumnName="AccreditationID" />
                <ScalarProperty Name="AccreditationExceptionID" ColumnName="AccreditationExceptionID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_AccreditationExceptionsUpdate" FunctionName="ApplicationModel.Store.Pr_AccreditationExceptionsUpdate" />
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="True" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="None" />
        <DesignerProperty Name="UseLegacyProvider" Value="False" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams>
      <Diagram DiagramId="79bbfdb8b482480ca14f44acbc0e404d" Name="Accreditation Issue Details" ZoomLevel="73" >
        <EntityTypeShape EntityType="Model.AccreditationIssueDetail" Width="1.5" PointX="0.75" PointY="0.75" />
        <EntityTypeShape EntityType="Model.Accreditation" Width="1.5" PointX="4.125" PointY="2.5" />
        <AssociationConnector Association="Model.FK_AccreditationIssueDetails_Accreditations" />
        <EntityTypeShape EntityType="Model.Member" Width="1.5" PointX="10.75" PointY="2.375" />
        <AssociationConnector Association="Model.FK_Accreditations_Members" />
        <EntityTypeShape EntityType="Model.AccreditationException" Width="1.5" PointX="6.375" PointY="3.875" />
        <AssociationConnector Association="Model.FK_AccreditationExceptions_Accreditations" />
      </Diagram>
      <Diagram DiagramId="d9775f7ebe1541f4af4eaf464e347443" Name="Views" >
        <EntityTypeShape EntityType="Model.Vw_AccreditationIssueDetails" Width="1.5" PointX="0.75" PointY="0.75" />
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>