<?xml version="1.0" encoding="utf-8"?>
<Schema xmlns="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:cg="http://schemas.microsoft.com/ado/2006/04/codegeneration" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" Namespace="EFProfilerTest" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" annotation:UseStrongSpatialTypes="false">
  <EntityContainer Name="EFProfilerTestContainer" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="Categories" EntityType="EFProfilerTest.Category" />
    <EntitySet Name="Products" EntityType="EFProfilerTest.Product" />
    <AssociationSet Name="CategoryProduct" Association="EFProfilerTest.CategoryProduct">
      <End Role="Category" EntitySet="Categories" />
      <End Role="Product" EntitySet="Products" />
    </AssociationSet>
    <EntitySet Name="Brands" EntityType="EFProfilerTest.Brand" />
    <AssociationSet Name="BrandProduct" Association="EFProfilerTest.BrandProduct">
      <End Role="Brand" EntitySet="Brands" />
      <End Role="Product" EntitySet="Products" />
    </AssociationSet>
    <EntitySet Name="Variants" EntityType="EFProfilerTest.Variant" />
    <AssociationSet Name="ProductVariant" Association="EFProfilerTest.ProductVariant">
      <End Role="Product" EntitySet="Products" />
      <End Role="Variant" EntitySet="Variants" />
    </AssociationSet>
    <EntitySet Name="Comments" EntityType="EFProfilerTest.Comment" />
    <EntitySet Name="Users" EntityType="EFProfilerTest.User" />
    <AssociationSet Name="ProductComment" Association="EFProfilerTest.ProductComment">
      <End Role="Product" EntitySet="Products" />
      <End Role="Comment" EntitySet="Comments" />
    </AssociationSet>
    <AssociationSet Name="UserComment" Association="EFProfilerTest.UserComment">
      <End Role="User" EntitySet="Users" />
      <End Role="Comment" EntitySet="Comments" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="Category">
    <Key>
      <PropertyRef Name="CategoryId" />
    </Key>
    <Property Name="CategoryId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="IsDelete" Type="Boolean" Nullable="false" />
    <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
    <Property Name="LastModifyDate" Type="DateTime" Nullable="false" />
    <NavigationProperty Name="Products" Relationship="EFProfilerTest.CategoryProduct" FromRole="Category" ToRole="Product" />
  </EntityType>
  <EntityType Name="Product">
    <Key>
      <PropertyRef Name="ProductId" />
    </Key>
    <Property Name="ProductId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="Price" Type="Double" Nullable="false" />
    <Property Name="Quantity" Type="String" Nullable="false" />
    <Property Name="IsDelete" Type="Boolean" Nullable="false" />
    <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
    <Property Name="LastModifyDate" Type="DateTime" Nullable="false" />
    <NavigationProperty Name="Category" Relationship="EFProfilerTest.CategoryProduct" FromRole="Product" ToRole="Category" />
    <Property Name="CategoryId" Type="Int32" Nullable="true" />
    <NavigationProperty Name="Brand" Relationship="EFProfilerTest.BrandProduct" FromRole="Product" ToRole="Brand" />
    <Property Name="BrandId" Type="Int32" Nullable="true" />
    <NavigationProperty Name="Variants" Relationship="EFProfilerTest.ProductVariant" FromRole="Product" ToRole="Variant" />
    <NavigationProperty Name="Comments" Relationship="EFProfilerTest.ProductComment" FromRole="Product" ToRole="Comment" />
  </EntityType>
  <Association Name="CategoryProduct">
    <End Type="EFProfilerTest.Category" Role="Category" Multiplicity="0..1" />
    <End Type="EFProfilerTest.Product" Role="Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Category">
        <PropertyRef Name="CategoryId" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="CategoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityType Name="Brand">
    <Key>
      <PropertyRef Name="BrandId" />
    </Key>
    <Property Name="BrandId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="IsDelete" Type="Boolean" Nullable="false" />
    <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
    <Property Name="LastModifyDate" Type="DateTime" Nullable="false" />
    <NavigationProperty Name="Products" Relationship="EFProfilerTest.BrandProduct" FromRole="Brand" ToRole="Product" />
  </EntityType>
  <Association Name="BrandProduct">
    <End Type="EFProfilerTest.Brand" Role="Brand" Multiplicity="0..1" />
    <End Type="EFProfilerTest.Product" Role="Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Brand">
        <PropertyRef Name="BrandId" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="BrandId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityType Name="Variant">
    <Key>
      <PropertyRef Name="VariantId" />
    </Key>
    <Property Name="VariantId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="Value" Type="String" Nullable="false" />
    <Property Name="Price" Type="Double" Nullable="false" />
    <Property Name="Quantity" Type="String" Nullable="false" />
    <Property Name="IsDelete" Type="Boolean" Nullable="false" />
    <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
    <Property Name="LastModifyDate" Type="DateTime" Nullable="false" />
    <NavigationProperty Name="Product" Relationship="EFProfilerTest.ProductVariant" FromRole="Variant" ToRole="Product" />
    <Property Name="ProductId" Type="Int32" Nullable="true" />
  </EntityType>
  <Association Name="ProductVariant">
    <End Type="EFProfilerTest.Product" Role="Product" Multiplicity="0..1" />
    <End Type="EFProfilerTest.Variant" Role="Variant" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductId" />
      </Principal>
      <Dependent Role="Variant">
        <PropertyRef Name="ProductId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityType Name="Comment">
    <Key>
      <PropertyRef Name="CommentId" />
    </Key>
    <Property Name="CommentId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Content" Type="String" Nullable="false" />
    <NavigationProperty Name="Product" Relationship="EFProfilerTest.ProductComment" FromRole="Comment" ToRole="Product" />
    <Property Name="ProductId" Type="Int32" Nullable="true" />
    <NavigationProperty Name="User" Relationship="EFProfilerTest.UserComment" FromRole="Comment" ToRole="User" />
    <Property Name="UserId" Type="Int32" Nullable="true" />
  </EntityType>
  <EntityType Name="User">
    <Key>
      <PropertyRef Name="UserId" />
    </Key>
    <Property Name="UserId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="IsActive" Type="Boolean" Nullable="false" />
    <Property Name="IsDelete" Type="Boolean" Nullable="false" />
    <Property Name="CreatedDate" Type="DateTime" Nullable="false" />
    <Property Name="LastModifyDate" Type="DateTime" Nullable="false" />
    <NavigationProperty Name="Comments" Relationship="EFProfilerTest.UserComment" FromRole="User" ToRole="Comment" />
  </EntityType>
  <Association Name="ProductComment">
    <End Type="EFProfilerTest.Product" Role="Product" Multiplicity="0..1" />
    <End Type="EFProfilerTest.Comment" Role="Comment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductId" />
      </Principal>
      <Dependent Role="Comment">
        <PropertyRef Name="ProductId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="UserComment">
    <End Type="EFProfilerTest.User" Role="User" Multiplicity="0..1" />
    <End Type="EFProfilerTest.Comment" Role="Comment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="User">
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="Comment">
        <PropertyRef Name="UserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
</Schema>