<?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="Хранилище user32Model" 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="Agent">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
          <Property Name="AgentTypeID" Type="int" Nullable="false" />
          <Property Name="Address" Type="nvarchar" MaxLength="300" />
          <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
          <Property Name="KPP" Type="varchar" MaxLength="9" />
          <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
          <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
          <Property Name="Email" Type="nvarchar" MaxLength="255" />
          <Property Name="Logo" Type="nvarchar" MaxLength="100" />
          <Property Name="Priority" Type="int" Nullable="false" />
        </EntityType>
        <EntityType Name="AgentType">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="Image" Type="nvarchar" MaxLength="100" />
        </EntityType>
        <EntityType Name="Product">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
          <Property Name="ProductTypeID" Type="int" />
          <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
          <Property Name="Description" Type="nvarchar(max)" />
          <Property Name="Image" Type="nvarchar" MaxLength="100" />
          <Property Name="ProductionPersonCount" Type="int" />
          <Property Name="ProductionWorkshopNumber" Type="int" />
          <Property Name="MinCostForAgent" Type="decimal" Precision="10" Scale="2" Nullable="false" />
        </EntityType>
        <EntityType Name="ProductSale">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="AgentID" Type="int" Nullable="false" />
          <Property Name="ProductID" Type="int" Nullable="false" />
          <Property Name="SaleDate" Type="date" Nullable="false" />
          <Property Name="ProductCount" Type="int" Nullable="false" />
        </EntityType>
        <EntityType Name="ProductType">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
          <Property Name="DefectedPercent" Type="float" />
        </EntityType>
        <Association Name="FK_Agent_AgentType">
          <End Role="AgentType" Type="Self.AgentType" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="AgentType">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="Agent">
              <PropertyRef Name="AgentTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Product_ProductType">
          <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="Product" Type="Self.Product" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="ProductType">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="Product">
              <PropertyRef Name="ProductTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ProductSale_Agent">
          <End Role="Agent" Type="Self.Agent" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Agent">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="ProductSale">
              <PropertyRef Name="AgentID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ProductSale_Product">
          <End Role="Product" Type="Self.Product" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Product">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="ProductSale">
              <PropertyRef Name="ProductID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Хранилище user32ModelContainer">
          <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
          <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
            <End Role="AgentType" EntitySet="AgentType" />
            <End Role="Agent" EntitySet="Agent" />
          </AssociationSet>
          <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
            <End Role="ProductType" EntitySet="ProductType" />
            <End Role="Product" EntitySet="Product" />
          </AssociationSet>
          <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
            <End Role="Agent" EntitySet="Agent" />
            <End Role="ProductSale" EntitySet="ProductSale" />
          </AssociationSet>
          <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
            <End Role="Product" EntitySet="Product" />
            <End Role="ProductSale" EntitySet="ProductSale" />
          </AssociationSet>
        </EntityContainer>
      </Schema></edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="user32Model" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityContainer Name="user32Entities" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Agent" EntityType="user32Model.Agent" />
          <EntitySet Name="AgentType" EntityType="user32Model.AgentType" />
          <EntitySet Name="Product" EntityType="user32Model.Product" />
          <EntitySet Name="ProductSale" EntityType="user32Model.ProductSale" />
          <EntitySet Name="ProductType" EntityType="user32Model.ProductType" />
          <AssociationSet Name="FK_Agent_AgentType" Association="user32Model.FK_Agent_AgentType">
            <End Role="AgentType" EntitySet="AgentType" />
            <End Role="Agent" EntitySet="Agent" />
          </AssociationSet>
          <AssociationSet Name="FK_ProductSale_Agent" Association="user32Model.FK_ProductSale_Agent">
            <End Role="Agent" EntitySet="Agent" />
            <End Role="ProductSale" EntitySet="ProductSale" />
          </AssociationSet>
          <AssociationSet Name="FK_Product_ProductType" Association="user32Model.FK_Product_ProductType">
            <End Role="ProductType" EntitySet="ProductType" />
            <End Role="Product" EntitySet="Product" />
          </AssociationSet>
          <AssociationSet Name="FK_ProductSale_Product" Association="user32Model.FK_ProductSale_Product">
            <End Role="Product" EntitySet="Product" />
            <End Role="ProductSale" EntitySet="ProductSale" />
          </AssociationSet>
        </EntityContainer>
        <EntityType Name="Agent">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="150" FixedLength="false" Unicode="true" />
          <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
          <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
          <Property Name="INN" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
          <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
          <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
          <Property Name="Phone" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
          <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
          <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
          <Property Name="Priority" Type="Int32" Nullable="false" />
          <NavigationProperty Name="AgentType" Relationship="user32Model.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
          <NavigationProperty Name="ProductSale" Relationship="user32Model.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
        </EntityType>
        <EntityType Name="AgentType">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
          <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
          <NavigationProperty Name="Agent" Relationship="user32Model.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
        </EntityType>
        <EntityType Name="Product">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" />
          <Property Name="ProductTypeID" Type="Int32" />
          <Property Name="ArticleNumber" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
          <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
          <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
          <Property Name="ProductionPersonCount" Type="Int32" />
          <Property Name="ProductionWorkshopNumber" Type="Int32" />
          <Property Name="MinCostForAgent" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
          <NavigationProperty Name="ProductType" Relationship="user32Model.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
          <NavigationProperty Name="ProductSale" Relationship="user32Model.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
        </EntityType>
        <EntityType Name="ProductSale">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="AgentID" Type="Int32" Nullable="false" />
          <Property Name="ProductID" Type="Int32" Nullable="false" />
          <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
          <Property Name="ProductCount" Type="Int32" Nullable="false" />
          <NavigationProperty Name="Agent" Relationship="user32Model.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
          <NavigationProperty Name="Product" Relationship="user32Model.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
        </EntityType>
        <EntityType Name="ProductType">
          <Key>
            <PropertyRef Name="ID" />
          </Key>
          <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Title" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
          <Property Name="DefectedPercent" Type="Double" />
          <NavigationProperty Name="Product" Relationship="user32Model.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
        </EntityType>
        <Association Name="FK_Agent_AgentType">
          <End Type="user32Model.AgentType" Role="AgentType" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Type="user32Model.Agent" Role="Agent" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="AgentType">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="Agent">
              <PropertyRef Name="AgentTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ProductSale_Agent">
          <End Type="user32Model.Agent" Role="Agent" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Type="user32Model.ProductSale" Role="ProductSale" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Agent">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="ProductSale">
              <PropertyRef Name="AgentID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Product_ProductType">
          <End Type="user32Model.ProductType" Role="ProductType" Multiplicity="0..1">
            <OnDelete Action="Cascade" />
          </End>
          <End Type="user32Model.Product" Role="Product" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="ProductType">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="Product">
              <PropertyRef Name="ProductTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_ProductSale_Product">
          <End Type="user32Model.Product" Role="Product" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Type="user32Model.ProductSale" Role="ProductSale" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Product">
              <PropertyRef Name="ID" />
            </Principal>
            <Dependent Role="ProductSale">
              <PropertyRef Name="ProductID" />
            </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="Хранилище user32ModelContainer" CdmEntityContainer="user32Entities">
          <EntitySetMapping Name="Agent">
            <EntityTypeMapping TypeName="user32Model.Agent">
              <MappingFragment StoreEntitySet="Agent">
                <ScalarProperty Name="Priority" ColumnName="Priority" />
                <ScalarProperty Name="Logo" ColumnName="Logo" />
                <ScalarProperty Name="Email" ColumnName="Email" />
                <ScalarProperty Name="Phone" ColumnName="Phone" />
                <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
                <ScalarProperty Name="KPP" ColumnName="KPP" />
                <ScalarProperty Name="INN" ColumnName="INN" />
                <ScalarProperty Name="Address" ColumnName="Address" />
                <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="ID" ColumnName="ID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="AgentType">
            <EntityTypeMapping TypeName="user32Model.AgentType">
              <MappingFragment StoreEntitySet="AgentType">
                <ScalarProperty Name="Image" ColumnName="Image" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="ID" ColumnName="ID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Product">
            <EntityTypeMapping TypeName="user32Model.Product">
              <MappingFragment StoreEntitySet="Product">
                <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
                <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
                <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
                <ScalarProperty Name="Image" ColumnName="Image" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
                <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="ID" ColumnName="ID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="ProductSale">
            <EntityTypeMapping TypeName="user32Model.ProductSale">
              <MappingFragment StoreEntitySet="ProductSale">
                <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
                <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
                <ScalarProperty Name="ProductID" ColumnName="ProductID" />
                <ScalarProperty Name="AgentID" ColumnName="AgentID" />
                <ScalarProperty Name="ID" ColumnName="ID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="ProductType">
            <EntityTypeMapping TypeName="user32Model.ProductType">
              <MappingFragment StoreEntitySet="ProductType">
                <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="ID" ColumnName="ID" />
              </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="false" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
        <DesignerProperty Name="UseLegacyProvider" Value="false" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>