<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="CountryCityModel.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="City">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" />
    <Property Name="StateId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="Country">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="State">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" />
    <Property Name="CountryId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <Association Name="FK_City_State">
    <End Role="State" Type="Self.State" Multiplicity="1" />
    <End Role="City" Type="Self.City" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="State">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="City">
        <PropertyRef Name="StateId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_State_State">
    <End Role="Country" Type="Self.Country" Multiplicity="1" />
    <End Role="State" Type="Self.State" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Country">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="State">
        <PropertyRef Name="CountryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="CountryCityModelStoreContainer">
    <EntitySet Name="City" EntityType="Self.City" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Country" EntityType="Self.Country" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="State" EntityType="Self.State" Schema="dbo" store:Type="Tables" />
    <AssociationSet Name="FK_City_State" Association="Self.FK_City_State">
      <End Role="State" EntitySet="State" />
      <End Role="City" EntitySet="City" />
    </AssociationSet>
    <AssociationSet Name="FK_State_State" Association="Self.FK_State_State">
      <End Role="Country" EntitySet="Country" />
      <End Role="State" EntitySet="State" />
    </AssociationSet>
  </EntityContainer>
</Schema>