﻿<?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="CorrespondenceModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2005" 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="Messages">
          <Key>
            <PropertyRef Name="MessageID" />
          </Key>
          <Property Name="MessageID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="MessageTypeID" Type="tinyint" Nullable="false" />
          <Property Name="EntityID" Type="int" />
          <Property Name="ItemID" Type="bigint" />
          <Property Name="Sender" Type="varchar" MaxLength="255" />
          <Property Name="Recipients" Type="varchar(max)" />
          <Property Name="CC" Type="varchar(max)" />
          <Property Name="BCC" Type="varchar(max)" />
          <Property Name="Subject" Type="varchar" MaxLength="1000" Nullable="false" />
          <Property Name="Message" Type="varchar(max)" />
          <Property Name="IsHtml" Type="bit" Nullable="false" />
          <Property Name="SentDate" Type="datetime" />
          <Property Name="Retries" Type="int" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" 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" />
        </EntityType>
        <EntityType Name="MessageTemplates">
          <Key>
            <PropertyRef Name="MessageTemplateID" />
          </Key>
          <Property Name="MessageTemplateID" Type="int" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="100" Nullable="false" />
          <Property Name="Subject" Type="varchar" MaxLength="1000" Nullable="false" />
          <Property Name="Message" Type="varchar(max)" Nullable="false" />
          <Property Name="RecipientSqlScript" Type="varchar(max)" />
          <Property Name="DatasetSqlScript" Type="varchar(max)" />
          <Property Name="IsSystemTemplate" Type="bit" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="MessageTypes">
          <Key>
            <PropertyRef Name="MessageTypeID" />
          </Key>
          <Property Name="MessageTypeID" Type="tinyint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
        </EntityType>
        <EntityType Name="Users">
          <Key>
            <PropertyRef Name="UserID" />
          </Key>
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="UserStatusID" Type="smallint" Nullable="false" />
          <Property Name="EntityID" Type="int" />
          <Property Name="ItemID" Type="varchar" MaxLength="20" />
          <Property Name="LastName" Type="varchar" MaxLength="50" />
          <Property Name="FirstName" Type="varchar" MaxLength="50" />
          <Property Name="FullName" Type="varchar" MaxLength="101" StoreGeneratedPattern="Computed" Nullable="false" />
          <Property Name="KnownAs" Type="varchar" MaxLength="101" />
          <Property Name="Email" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="NTAccount" Type="varchar" MaxLength="255" />
          <Property Name="Cell" Type="varchar" MaxLength="10" />
          <Property Name="IsPasswordExpired" Type="bit" />
          <Property Name="PasswordDate" Type="datetime" />
          <Property Name="PasswordHash" Type="varchar" MaxLength="255" />
          <Property Name="PasswordSalt" Type="varchar" MaxLength="20" />
          <Property Name="PasswordChallenge" Type="varchar" MaxLength="20" />
          <Property Name="PasswordQuestion" Type="varchar" MaxLength="255" />
          <Property Name="PasswordAnswerHash" Type="varchar" MaxLength="255" />
          <Property Name="PasswordAnswerSalt" Type="varchar" MaxLength="20" />
          <Property Name="PasswordAnswerChallenge" Type="varchar" MaxLength="20" />
          <Property Name="FingerprintTemplate" Type="varbinary(max)" />
          <Property Name="FingerprintRequestToken" Type="varchar" MaxLength="255" />
          <Property Name="FingerprintRequestExpiryDate" Type="datetime" />
          <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" />
        </EntityType>
        <Association Name="FK_Messages_MessageTypes">
          <End Role="MessageTypes" Type="Self.MessageTypes" Multiplicity="1" />
          <End Role="Messages" Type="Self.Messages" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="MessageTypes">
              <PropertyRef Name="MessageTypeID" />
            </Principal>
            <Dependent Role="Messages">
              <PropertyRef Name="MessageTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Messages_UserCreatedBy">
          <End Role="Users" Type="Self.Users" Multiplicity="1" />
          <End Role="Messages" Type="Self.Messages" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="Messages">
              <PropertyRef Name="CreatedByID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Messages_UserUpdateBy">
          <End Role="Users" Type="Self.Users" Multiplicity="1" />
          <End Role="Messages" Type="Self.Messages" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="Messages">
              <PropertyRef Name="UpdatedByID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_EntityRecipientGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Crm">
          <Parameter Name="MessageTypeID" Type="smallint" Mode="In" />
          <Parameter Name="EntityID" Type="bigint" Mode="In" />
          <Parameter Name="ItemID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_MessageCreate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Crm">
          <Parameter Name="EntityID" Type="int" Mode="In" />
          <Parameter Name="ItemID" Type="bigint" Mode="In" />
          <Parameter Name="MessageTypeID" Type="tinyint" Mode="In" />
          <Parameter Name="Recipients" Type="varchar(max)" Mode="In" />
          <Parameter Name="CC" Type="varchar(max)" Mode="In" />
          <Parameter Name="BCC" Type="varchar(max)" Mode="In" />
          <Parameter Name="Subject" Type="varchar" Mode="In" />
          <Parameter Name="Message" Type="varchar(max)" Mode="In" />
          <Parameter Name="IsHtml" Type="bit" Mode="In" />
          <Parameter Name="MessageByUserName" Type="varchar" Mode="In" />
        </Function>
        <Function Name="Pr_MessageCreateAttachment" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Crm">
          <Parameter Name="MessageID" Type="bigint" Mode="In" />
          <Parameter Name="CreatedByID" Type="bigint" Mode="In" />
          <Parameter Name="ContentBLOB" Type="image" Mode="In" />
          <Parameter Name="MimeType" Type="varchar" Mode="In" />
          <Parameter Name="Size" Type="bigint" Mode="In" />
          <Parameter Name="Name" Type="varchar" Mode="In" />
          <Parameter Name="Ext" Type="varchar" Mode="In" />
        </Function>
        <Function Name="Pr_MessageDelete" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Crm">
          <Parameter Name="MessageID" Type="bigint" Mode="In" />
          <Parameter Name="MessageByUserName" Type="varchar" Mode="In" />
        </Function>
        <Function Name="Pr_MessageUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Crm">
          <Parameter Name="MessageID" Type="bigint" Mode="In" />
          <Parameter Name="Recipients" Type="varchar(max)" Mode="In" />
          <Parameter Name="CC" Type="varchar(max)" Mode="In" />
          <Parameter Name="BCC" Type="varchar(max)" Mode="In" />
          <Parameter Name="Subject" Type="varchar" Mode="In" />
          <Parameter Name="Message" Type="varchar(max)" Mode="In" />
          <Parameter Name="MessageByUserName" Type="varchar" Mode="In" />
        </Function>
        <EntityContainer Name="CorrespondenceModelStoreContainer">
          <EntitySet Name="Messages" EntityType="Self.Messages" Schema="Crm" store:Type="Tables" />
          <EntitySet Name="MessageTemplates" EntityType="Self.MessageTemplates" Schema="Crm" store:Type="Tables" />
          <EntitySet Name="MessageTypes" EntityType="Self.MessageTypes" Schema="Crm" store:Type="Tables" />
          <EntitySet Name="Users" EntityType="Self.Users" Schema="Security" store:Type="Tables" />
          <AssociationSet Name="FK_Messages_MessageTypes" Association="Self.FK_Messages_MessageTypes">
            <End Role="MessageTypes" EntitySet="MessageTypes" />
            <End Role="Messages" EntitySet="Messages" />
          </AssociationSet>
          <AssociationSet Name="FK_Messages_UserCreatedBy" Association="Self.FK_Messages_UserCreatedBy">
            <End Role="Users" EntitySet="Users" />
            <End Role="Messages" EntitySet="Messages" />
          </AssociationSet>
          <AssociationSet Name="FK_Messages_UserUpdateBy" Association="Self.FK_Messages_UserUpdateBy">
            <End Role="Users" EntitySet="Users" />
            <End Role="Messages" EntitySet="Messages" />
          </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="CorrespondenceContext" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Messages" EntityType="Model.Message" />
          <EntitySet Name="MessageTypes" EntityType="Model.MessageType" />
          <AssociationSet Name="FK_Messages_MessageTypes" Association="Model.FK_Messages_MessageTypes">
            <End Role="MessageTypes" EntitySet="MessageTypes" />
            <End Role="Messages" EntitySet="Messages" />
          </AssociationSet>
          <FunctionImport Name="Pr_MessageCreate" ReturnType="Collection(Int64)">
            <Parameter Name="EntityID" Mode="In" Type="Int32" />
            <Parameter Name="ItemID" Mode="In" Type="Int64" />
            <Parameter Name="MessageTypeID" Mode="In" Type="Byte" />
            <Parameter Name="Recipients" Mode="In" Type="String" />
            <Parameter Name="CC" Mode="In" Type="String" />
            <Parameter Name="BCC" Mode="In" Type="String" />
            <Parameter Name="Subject" Mode="In" Type="String" />
            <Parameter Name="Message" Mode="In" Type="String" />
            <Parameter Name="IsHtml" Mode="In" Type="Boolean" />
            <Parameter Name="MessageByUserName" Mode="In" Type="String" />
          </FunctionImport>
          <FunctionImport Name="Pr_MessageDelete" ReturnType="Collection(Boolean)">
            <Parameter Name="MessageID" Mode="In" Type="Int64" />
            <Parameter Name="MessageByUserName" Mode="In" Type="String" />
          </FunctionImport>
          <FunctionImport Name="Pr_MessageUpdate" ReturnType="Collection(Boolean)">
            <Parameter Name="MessageID" Mode="In" Type="Int64" />
            <Parameter Name="Recipients" Mode="In" Type="String" />
            <Parameter Name="CC" Mode="In" Type="String" />
            <Parameter Name="BCC" Mode="In" Type="String" />
            <Parameter Name="Subject" Mode="In" Type="String" />
            <Parameter Name="Message" Mode="In" Type="String" />
            <Parameter Name="MessageByUserName" Mode="In" Type="String" />
          </FunctionImport>
          <EntitySet Name="MessageTemplates" EntityType="Model.MessageTemplate" />
          <EntitySet Name="MessageUsers" EntityType="Model.MessageUser" />
          <AssociationSet Name="FK_Messages_UserCreatedBy" Association="Model.FK_Messages_UserCreatedBy">
            <End Role="User" EntitySet="MessageUsers" />
            <End Role="Message" EntitySet="Messages" />
          </AssociationSet>
          <AssociationSet Name="FK_Messages_UserUpdateBy" Association="Model.FK_Messages_UserUpdateBy">
            <End Role="User" EntitySet="MessageUsers" />
            <End Role="Message" EntitySet="Messages" />
          </AssociationSet>
          <FunctionImport Name="Pr_MessageCreateAttachment">
            <Parameter Name="MessageID" Mode="In" Type="Int64" />
            <Parameter Name="CreatedByID" Mode="In" Type="Int64" />
            <Parameter Name="ContentBLOB" Mode="In" Type="Binary" />
            <Parameter Name="MimeType" Mode="In" Type="String" />
            <Parameter Name="Size" Mode="In" Type="Int64" />
            <Parameter Name="Name" Mode="In" Type="String" />
            <Parameter Name="Ext" Mode="In" Type="String" />
          </FunctionImport>
          <FunctionImport Name="Pr_EntityRecipientGet" ReturnType="Collection(String)">
            <Parameter Name="MessageTypeID" Mode="In" Type="Int16" />
            <Parameter Name="EntityID" Mode="In" Type="Int64" />
            <Parameter Name="ItemID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
        </EntityContainer>
        <EntityType Name="Message">
          <Key>
            <PropertyRef Name="MessageID" />
          </Key>
          <Property Name="MessageID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="MessageTypeID" Type="Byte" Nullable="false" />
          <Property Name="EntityID" Type="Int32" />
          <Property Name="ItemID" Type="Int64" />
          <Property Name="Sender" Type="String" MaxLength="255" Unicode="false" FixedLength="false" />
          <Property Name="Recipients" Type="String" MaxLength="Max" Unicode="false" FixedLength="false" />
          <Property Name="CC" Type="String" MaxLength="Max" Unicode="false" FixedLength="false" />
          <Property Name="BCC" Type="String" MaxLength="Max" Unicode="false" FixedLength="false" />
          <Property Name="Subject" Type="String" Nullable="false" MaxLength="1000" Unicode="false" FixedLength="false" />
          <Property Name="Content" Type="String" MaxLength="Max" Unicode="false" FixedLength="false" >
          </Property>
          <Property Name="IsHtml" Type="Boolean" Nullable="false" />
          <Property Name="SentDate" Type="DateTime" Precision="3" />
          <Property Name="IsCancelled" Type="Boolean" 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" />
          <NavigationProperty Name="MessageType" Relationship="Model.FK_Messages_MessageTypes" FromRole="Messages" ToRole="MessageTypes" />
          <Property Type="Int32" Name="Retries" Nullable="false" />
          <NavigationProperty Name="UserCreatedBy" Relationship="Model.FK_Messages_UserCreatedBy" FromRole="Message" ToRole="User" />
          <NavigationProperty Name="UserUpdatedBy" Relationship="Model.FK_Messages_UserUpdateBy" FromRole="Message" ToRole="User" />
        </EntityType>
        <EntityType Name="MessageType">
          <Key>
            <PropertyRef Name="MessageTypeID" />
          </Key>
          <Property Name="MessageTypeID" Type="Byte" Nullable="false" />
          <Property Name="Description" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
        </EntityType>
        <Association Name="FK_Messages_MessageTypes">
          <End Role="MessageTypes" Type="Model.MessageType" Multiplicity="1" />
          <End Role="Messages" Type="Model.Message" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="MessageTypes">
              <PropertyRef Name="MessageTypeID" />
            </Principal>
            <Dependent Role="Messages">
              <PropertyRef Name="MessageTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="MessageTemplate">
          <Key>
            <PropertyRef Name="MessageTemplateID" />
          </Key>
          <Property Type="Int32" Name="MessageTemplateID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="Message" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <Property Type="String" Name="Subject" Nullable="false" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsSystemTemplate" Nullable="false" />
          <Property Type="String" Name="RecipientSqlScript" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="DatasetSqlScript" MaxLength="Max" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="MessageUser">
          <Key>
            <PropertyRef Name="UserID" />
          </Key>
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="Int16" Name="UserStatusID" Nullable="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" />
          <Property Type="String" Name="FullName" Nullable="false" MaxLength="101" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="String" Name="Email" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
        </EntityType>
        <Association Name="FK_Messages_UserCreatedBy">
          <End Type="Model.MessageUser" Role="User" Multiplicity="1" />
          <End Type="Model.Message" Role="Message" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="User">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="Message">
              <PropertyRef Name="CreatedByID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Messages_UserUpdateBy">
          <End Type="Model.MessageUser" Role="User" Multiplicity="1" />
          <End Type="Model.Message" Role="Message" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="User">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="Message">
              <PropertyRef Name="UpdatedByID" />
            </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="CorrespondenceModelStoreContainer" CdmEntityContainer="CorrespondenceContext">
          <EntitySetMapping Name="Messages"><EntityTypeMapping TypeName="Model.Message"><MappingFragment StoreEntitySet="Messages">
            <ScalarProperty Name="Retries" ColumnName="Retries" />
                <ScalarProperty Name="MessageID" ColumnName="MessageID" />
            <ScalarProperty Name="MessageTypeID" ColumnName="MessageTypeID" />
            <ScalarProperty Name="EntityID" ColumnName="EntityID" />
            <ScalarProperty Name="ItemID" ColumnName="ItemID" />
            <ScalarProperty Name="Sender" ColumnName="Sender" />
            <ScalarProperty Name="Recipients" ColumnName="Recipients" />
            <ScalarProperty Name="CC" ColumnName="CC" />
            <ScalarProperty Name="BCC" ColumnName="BCC" />
            <ScalarProperty Name="Subject" ColumnName="Subject" />
            <ScalarProperty Name="Content" ColumnName="Message" />
            <ScalarProperty Name="IsHtml" ColumnName="IsHtml" />
            <ScalarProperty Name="SentDate" ColumnName="SentDate" />
            <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
            <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
            <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
            <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
            <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="MessageTypes"><EntityTypeMapping TypeName="Model.MessageType"><MappingFragment StoreEntitySet="MessageTypes">
            <ScalarProperty Name="MessageTypeID" ColumnName="MessageTypeID" />
            <ScalarProperty Name="Description" ColumnName="Description" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_MessageCreate" FunctionName="CorrespondenceModel.Store.Pr_MessageCreate" />
          <FunctionImportMapping FunctionImportName="Pr_MessageDelete" FunctionName="CorrespondenceModel.Store.Pr_MessageDelete" />
          <FunctionImportMapping FunctionImportName="Pr_MessageUpdate" FunctionName="CorrespondenceModel.Store.Pr_MessageUpdate" />
          <EntitySetMapping Name="MessageTemplates">
            <EntityTypeMapping TypeName="Model.MessageTemplate">
              <MappingFragment StoreEntitySet="MessageTemplates">
                <ScalarProperty Name="DatasetSqlScript" ColumnName="DatasetSqlScript" />
                <ScalarProperty Name="RecipientSqlScript" ColumnName="RecipientSqlScript" />
                <ScalarProperty Name="IsSystemTemplate" ColumnName="IsSystemTemplate" />
                <ScalarProperty Name="Subject" ColumnName="Subject" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Message" ColumnName="Message" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="MessageTemplateID" ColumnName="MessageTemplateID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="MessageUsers">
            <EntityTypeMapping TypeName="Model.MessageUser">
              <MappingFragment StoreEntitySet="Users">
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="Email" ColumnName="Email" />
                <ScalarProperty Name="FullName" ColumnName="FullName" />
                <ScalarProperty Name="UserStatusID" ColumnName="UserStatusID" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_MessageCreateAttachment" FunctionName="CorrespondenceModel.Store.Pr_MessageCreateAttachment" />
          <FunctionImportMapping FunctionImportName="Pr_EntityRecipientGet" FunctionName="CorrespondenceModel.Store.Pr_EntityRecipientGet" />
        </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="CorrespondenceModel">
        <EntityTypeShape EntityType="Model.Message" Width="1.5" PointX="3" PointY="1" Height="4.480205078125" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.MessageType" Width="1.5" PointX="0.75" PointY="2.5" Height="1.4033821614583331" IsExpanded="true" />
        <AssociationConnector Association="Model.FK_Messages_MessageTypes" ManuallyRouted="false">
          <ConnectorPoint PointX="2.25" PointY="3.2016910807291667" />
          <ConnectorPoint PointX="3" PointY="3.2016910807291667" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.MessageTemplate" Width="1.5" PointX="5.875" PointY="0.625" Height="1.5956835937499996" />
        <EntityTypeShape EntityType="Model.MessageUser" Width="2.75" PointX="5.75" PointY="4.625" Height="5.634013671875" />
        <AssociationConnector Association="Model.FK_Messages_UserCreatedBy" >
          <ConnectorPoint PointX="5.75" PointY="5.56091552734375" />
          <ConnectorPoint PointX="4.5" PointY="5.56091552734375" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_Messages_UserUpdateBy" >
          <ConnectorPoint PointX="5.75" PointY="4.9679577636718744" />
          <ConnectorPoint PointX="4.5" PointY="4.9679577636718744" />
        </AssociationConnector>
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>