<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="EFProfilerTest.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2012" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityContainer Name="EFProfilerTestStoreContainer">
    <EntitySet Name="Categories" EntityType="EFProfilerTest.Store.Categories" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Products" EntityType="EFProfilerTest.Store.Products" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Brands" EntityType="EFProfilerTest.Store.Brands" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Variants" EntityType="EFProfilerTest.Store.Variants" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Comments" EntityType="EFProfilerTest.Store.Comments" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Users" EntityType="EFProfilerTest.Store.Users" store:Type="Tables" Schema="dbo" />
    <AssociationSet Name="CategoryProduct" Association="EFProfilerTest.Store.CategoryProduct">
      <End Role="Category" EntitySet="Categories" />
      <End Role="Product" EntitySet="Products" />
    </AssociationSet>
    <AssociationSet Name="BrandProduct" Association="EFProfilerTest.Store.BrandProduct">
      <End Role="Brand" EntitySet="Brands" />
      <End Role="Product" EntitySet="Products" />
    </AssociationSet>
    <AssociationSet Name="ProductVariant" Association="EFProfilerTest.Store.ProductVariant">
      <End Role="Product" EntitySet="Products" />
      <End Role="Variant" EntitySet="Variants" />
    </AssociationSet>
    <AssociationSet Name="ProductComment" Association="EFProfilerTest.Store.ProductComment">
      <End Role="Product" EntitySet="Products" />
      <End Role="Comment" EntitySet="Comments" />
    </AssociationSet>
    <AssociationSet Name="UserComment" Association="EFProfilerTest.Store.UserComment">
      <End Role="User" EntitySet="Users" />
      <End Role="Comment" EntitySet="Comments" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="Categories">
    <Key>
      <PropertyRef Name="CategoryId" />
    </Key>
    <Property Name="CategoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
    <Property Name="IsDelete" Type="bit" Nullable="false" />
    <Property Name="CreatedDate" Type="datetime" Nullable="false" />
    <Property Name="LastModifyDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Products">
    <Key>
      <PropertyRef Name="ProductId" />
    </Key>
    <Property Name="ProductId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
    <Property Name="Price" Type="float" Nullable="false" />
    <Property Name="Quantity" Type="nvarchar(max)" Nullable="false" />
    <Property Name="IsDelete" Type="bit" Nullable="false" />
    <Property Name="CreatedDate" Type="datetime" Nullable="false" />
    <Property Name="LastModifyDate" Type="datetime" Nullable="false" />
    <Property Name="CategoryId" Type="int" Nullable="true" />
    <Property Name="BrandId" Type="int" Nullable="true" />
  </EntityType>
  <EntityType Name="Brands">
    <Key>
      <PropertyRef Name="BrandId" />
    </Key>
    <Property Name="BrandId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
    <Property Name="IsDelete" Type="bit" Nullable="false" />
    <Property Name="CreatedDate" Type="datetime" Nullable="false" />
    <Property Name="LastModifyDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Variants">
    <Key>
      <PropertyRef Name="VariantId" />
    </Key>
    <Property Name="VariantId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
    <Property Name="Value" Type="nvarchar(max)" Nullable="false" />
    <Property Name="Price" Type="float" Nullable="false" />
    <Property Name="Quantity" Type="nvarchar(max)" Nullable="false" />
    <Property Name="IsDelete" Type="bit" Nullable="false" />
    <Property Name="CreatedDate" Type="datetime" Nullable="false" />
    <Property Name="LastModifyDate" Type="datetime" Nullable="false" />
    <Property Name="ProductId" Type="int" Nullable="true" />
  </EntityType>
  <EntityType Name="Comments">
    <Key>
      <PropertyRef Name="CommentId" />
    </Key>
    <Property Name="CommentId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Content" Type="nvarchar(max)" Nullable="false" />
    <Property Name="ProductId" Type="int" Nullable="true" />
    <Property Name="UserId" Type="int" Nullable="true" />
  </EntityType>
  <EntityType Name="Users">
    <Key>
      <PropertyRef Name="UserId" />
    </Key>
    <Property Name="UserId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
    <Property Name="IsActive" Type="bit" Nullable="false" />
    <Property Name="IsDelete" Type="bit" Nullable="false" />
    <Property Name="CreatedDate" Type="datetime" Nullable="false" />
    <Property Name="LastModifyDate" Type="datetime" Nullable="false" />
  </EntityType>
  <Association Name="CategoryProduct">
    <End Role="Category" Type="EFProfilerTest.Store.Categories" Multiplicity="0..1" />
    <End Role="Product" Type="EFProfilerTest.Store.Products" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Category">
        <PropertyRef Name="CategoryId" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="CategoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="BrandProduct">
    <End Role="Brand" Type="EFProfilerTest.Store.Brands" Multiplicity="0..1" />
    <End Role="Product" Type="EFProfilerTest.Store.Products" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Brand">
        <PropertyRef Name="BrandId" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="BrandId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="ProductVariant">
    <End Role="Product" Type="EFProfilerTest.Store.Products" Multiplicity="0..1" />
    <End Role="Variant" Type="EFProfilerTest.Store.Variants" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductId" />
      </Principal>
      <Dependent Role="Variant">
        <PropertyRef Name="ProductId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="ProductComment">
    <End Role="Product" Type="EFProfilerTest.Store.Products" Multiplicity="0..1" />
    <End Role="Comment" Type="EFProfilerTest.Store.Comments" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductId" />
      </Principal>
      <Dependent Role="Comment">
        <PropertyRef Name="ProductId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="UserComment">
    <End Role="User" Type="EFProfilerTest.Store.Users" Multiplicity="0..1" />
    <End Role="Comment" Type="EFProfilerTest.Store.Comments" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="User">
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="Comment">
        <PropertyRef Name="UserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
</Schema>