﻿<?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="Model.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityContainer Name="ModelStoreContainer">
          <EntitySet Name="PollFrequencies" EntityType="Model.Store.PollFrequencies" store:Type="Tables" Schema="Svc" />
          <EntitySet Name="Services" EntityType="Model.Store.Services" store:Type="Tables" Schema="Svc" />
          <EntitySet Name="ServiceSettings" EntityType="Model.Store.ServiceSettings" store:Type="Tables" Schema="Svc" />
          <EntitySet Name="Settings" EntityType="Model.Store.Settings" store:Type="Tables" Schema="System" />
          <AssociationSet Name="FK_Services_PollFrequencies" Association="Model.Store.FK_Services_PollFrequencies">
            <End Role="PollFrequencies" EntitySet="PollFrequencies" />
            <End Role="Services" EntitySet="Services" />
          </AssociationSet>
          <AssociationSet Name="FK_ServiceSettings_Services" Association="Model.Store.FK_ServiceSettings_Services">
            <End Role="Services" EntitySet="Services" />
            <End Role="ServiceSettings" EntitySet="ServiceSettings" />
          </AssociationSet>
        </EntityContainer>
        <EntityType Name="PollFrequencies">
          <Key>
            <PropertyRef Name="PollFrequencyID" />
          </Key>
          <Property Name="PollFrequencyID" Type="smallint" Nullable="false" />
          <Property Name="Title" Type="varchar" Nullable="false" MaxLength="50" />
        </EntityType>
        <EntityType Name="Services">
          <Key>
            <PropertyRef Name="ServiceID" />
          </Key>
          <Property Name="ServiceID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="ServiceName" Type="varchar" Nullable="false" MaxLength="50" />
          <Property Name="ServiceTypeName" Type="varchar" Nullable="false" MaxLength="255" />
          <Property Name="PollFrequencyID" Type="smallint" Nullable="false" />
          <Property Name="PollTime" Type="varchar" Nullable="false" MaxLength="10" />
          <Property Name="LastRunDate" Type="smalldatetime" />
          <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="ServiceSettings">
          <Key>
            <PropertyRef Name="ServiceSettingID" />
          </Key>
          <Property Name="ServiceSettingID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="ServiceID" Type="int" Nullable="false" />
          <Property Name="SettingKey" Type="varchar" Nullable="false" MaxLength="50" />
          <Property Name="SettingValue" Type="varchar(max)" Nullable="false" />
        </EntityType>
        <EntityType Name="Settings">
          <Key>
            <PropertyRef Name="SettingName" />
          </Key>
          <Property Name="SettingName" Type="varchar" Nullable="false" MaxLength="50" />
          <Property Name="SettingValue" Type="varchar(max)" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <Association Name="FK_Services_PollFrequencies">
          <End Role="PollFrequencies" Type="Model.Store.PollFrequencies" Multiplicity="1" />
          <End Role="Services" Type="Model.Store.Services" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="PollFrequencies">
              <PropertyRef Name="PollFrequencyID" />
            </Principal>
            <Dependent Role="Services">
              <PropertyRef Name="PollFrequencyID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ServiceSettings_Services">
          <End Role="Services" Type="Model.Store.Services" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="ServiceSettings" Type="Model.Store.ServiceSettings" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Services">
              <PropertyRef Name="ServiceID" />
            </Principal>
            <Dependent Role="ServiceSettings">
              <PropertyRef Name="ServiceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_ServiceUpdateStatus" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Svc">
          <Parameter Name="ServiceID" Type="bigint" Mode="In" />
          <Parameter Name="RunDate" Type="smalldatetime" Mode="In" />
          <Parameter Name="UpdatedByID" Type="bigint" Mode="In" />
          <Parameter Name="TraceInfo" Type="varchar(max)" Mode="In" />
          <Parameter Name="AuditInfo" Type="varchar(max)" Mode="In" />
        </Function>
      </Schema></edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Services" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityContainer Name="ServiceContext" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="PollFrequencies" EntityType="Services.PollFrequency" />
          <EntitySet Name="Services" EntityType="Services.Service" />
          <EntitySet Name="ServiceSettings" EntityType="Services.ServiceSetting" />
          <AssociationSet Name="FK_Services_PollFrequencies" Association="Services.FK_Services_PollFrequencies">
            <End Role="PollFrequencies" EntitySet="PollFrequencies" />
            <End Role="Services" EntitySet="Services" />
          </AssociationSet>
          <AssociationSet Name="FK_ServiceSettings_Services" Association="Services.FK_ServiceSettings_Services">
            <End Role="Services" EntitySet="Services" />
            <End Role="ServiceSettings" EntitySet="ServiceSettings" />
          </AssociationSet>
          <FunctionImport Name="Pr_ServiceUpdateStatus">
            <Parameter Name="ServiceID" Mode="In" Type="Int64" />
            <Parameter Name="RunDate" Mode="In" Type="DateTime" />
            <Parameter Name="UpdatedByID" Mode="In" Type="Int64" />
            <Parameter Name="TraceInfo" Mode="In" Type="String" />
            <Parameter Name="AuditInfo" Mode="In" Type="String" />
          </FunctionImport>
          <EntitySet Name="Settings" EntityType="Services.Setting" />
        </EntityContainer>
        <EntityType Name="PollFrequency">
          <Key>
            <PropertyRef Name="PollFrequencyID" />
          </Key>
          <Property Name="PollFrequencyID" Type="Int16" Nullable="false" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <NavigationProperty Name="Services" Relationship="Services.FK_Services_PollFrequencies" FromRole="PollFrequencies" ToRole="Services" />
        </EntityType>
        <EntityType Name="Service">
          <Key>
            <PropertyRef Name="ServiceID" />
          </Key>
          <Property Name="ServiceID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ServiceName" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <Property Name="ServiceTypeName" Type="String" Nullable="false" MaxLength="255" Unicode="false" FixedLength="false" />
          <Property Name="PollFrequencyID" Type="Int16" Nullable="false" />
          <Property Name="PollTime" Type="String" Nullable="false" MaxLength="10" Unicode="false" FixedLength="false" />
          <Property Name="LastRunDate" Type="DateTime" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" />
          <NavigationProperty Name="PollFrequency" Relationship="Services.FK_Services_PollFrequencies" FromRole="Services" ToRole="PollFrequencies" />
          <NavigationProperty Name="ServiceSettings" Relationship="Services.FK_ServiceSettings_Services" FromRole="Services" ToRole="ServiceSettings" />
        </EntityType>
        <EntityType Name="ServiceSetting">
          <Key>
            <PropertyRef Name="ServiceSettingID" />
          </Key>
          <Property Name="ServiceSettingID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ServiceID" Type="Int32" Nullable="false" />
          <Property Name="SettingKey" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <Property Name="SettingValue" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <NavigationProperty Name="Service" Relationship="Services.FK_ServiceSettings_Services" FromRole="ServiceSettings" ToRole="Services" />
        </EntityType>
        <Association Name="FK_Services_PollFrequencies">
          <End Role="PollFrequencies" Type="Services.PollFrequency" Multiplicity="1" />
          <End Role="Services" Type="Services.Service" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="PollFrequencies">
              <PropertyRef Name="PollFrequencyID" />
            </Principal>
            <Dependent Role="Services">
              <PropertyRef Name="PollFrequencyID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ServiceSettings_Services">
          <End Role="Services" Type="Services.Service" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="ServiceSettings" Type="Services.ServiceSetting" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Services">
              <PropertyRef Name="ServiceID" />
            </Principal>
            <Dependent Role="ServiceSettings">
              <PropertyRef Name="ServiceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Setting">
          <Key>
            <PropertyRef Name="SettingName" />
          </Key>
          <Property Type="String" Name="SettingName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="SettingValue" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
        </EntityType>
      </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="ModelStoreContainer" CdmEntityContainer="ServiceContext">
          <EntitySetMapping Name="PollFrequencies"><EntityTypeMapping TypeName="Services.PollFrequency"><MappingFragment StoreEntitySet="PollFrequencies">
            <ScalarProperty Name="PollFrequencyID" ColumnName="PollFrequencyID" />
            <ScalarProperty Name="Title" ColumnName="Title" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="Services"><EntityTypeMapping TypeName="Services.Service"><MappingFragment StoreEntitySet="Services">
            <ScalarProperty Name="ServiceID" ColumnName="ServiceID" />
            <ScalarProperty Name="ServiceName" ColumnName="ServiceName" />
            <ScalarProperty Name="ServiceTypeName" ColumnName="ServiceTypeName" />
            <ScalarProperty Name="PollFrequencyID" ColumnName="PollFrequencyID" />
            <ScalarProperty Name="PollTime" ColumnName="PollTime" />
            <ScalarProperty Name="LastRunDate" ColumnName="LastRunDate" />
            <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="ServiceSettings"><EntityTypeMapping TypeName="Services.ServiceSetting"><MappingFragment StoreEntitySet="ServiceSettings">
            <ScalarProperty Name="ServiceSettingID" ColumnName="ServiceSettingID" />
            <ScalarProperty Name="ServiceID" ColumnName="ServiceID" />
            <ScalarProperty Name="SettingKey" ColumnName="SettingKey" />
            <ScalarProperty Name="SettingValue" ColumnName="SettingValue" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_ServiceUpdateStatus" FunctionName="Model.Store.Pr_ServiceUpdateStatus" />
          <EntitySetMapping Name="Settings">
            <EntityTypeMapping TypeName="Services.Setting">
              <MappingFragment StoreEntitySet="Settings">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="SettingValue" ColumnName="SettingValue" />
                <ScalarProperty Name="SettingName" ColumnName="SettingName" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </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" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams>
      <Diagram Name="Model">
        <EntityTypeShape EntityType="Services.PollFrequency" Width="1.5" PointX="0.5" PointY="0.5" Height="1.5956835937499996" IsExpanded="true" />
        <EntityTypeShape EntityType="Services.Service" Width="1.5" PointX="2.875" PointY="0.5" Height="3.5186979166666656" IsExpanded="true" />
        <EntityTypeShape EntityType="Services.ServiceSetting" Width="1.5" PointX="5" PointY="0.5" Height="1.9802864583333335" IsExpanded="true" />
        <AssociationConnector Association="Services.FK_Services_PollFrequencies" ManuallyRouted="false">
          <ConnectorPoint PointX="2" PointY="1.2978417968749998" />
          <ConnectorPoint PointX="2.875" PointY="1.2978417968749998" />
        </AssociationConnector>
        <AssociationConnector Association="Services.FK_ServiceSettings_Services" ManuallyRouted="false">
          <ConnectorPoint PointX="4.375" PointY="1.4901432291666668" />
          <ConnectorPoint PointX="5" PointY="1.4901432291666668" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Services.Setting" Width="1.5" PointX="7.75" PointY="0.625" Height="1.5956835937499996" />
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>