Model1.csdl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="TestProductModel" 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">
  3. <EntityContainer Name="TestProductEntities" annotation:LazyLoadingEnabled="true">
  4. <EntitySet Name="Basket" EntityType="TestProductModel.Basket" />
  5. <EntitySet Name="PickPoint" EntityType="TestProductModel.PickPoint" />
  6. <EntitySet Name="Product" EntityType="TestProductModel.Product" />
  7. <EntitySet Name="ProductBaskets" EntityType="TestProductModel.ProductBaskets" />
  8. <AssociationSet Name="FK_Basket_PickPoint" Association="TestProductModel.FK_Basket_PickPoint">
  9. <End Role="PickPoint" EntitySet="PickPoint" />
  10. <End Role="Basket" EntitySet="Basket" />
  11. </AssociationSet>
  12. <AssociationSet Name="FK_ProductBaskets_Basket" Association="TestProductModel.FK_ProductBaskets_Basket">
  13. <End Role="Basket" EntitySet="Basket" />
  14. <End Role="ProductBaskets" EntitySet="ProductBaskets" />
  15. </AssociationSet>
  16. <AssociationSet Name="FK_ProductBaskets_Product" Association="TestProductModel.FK_ProductBaskets_Product">
  17. <End Role="Product" EntitySet="Product" />
  18. <End Role="ProductBaskets" EntitySet="ProductBaskets" />
  19. </AssociationSet>
  20. </EntityContainer>
  21. <EntityType Name="Basket">
  22. <Key>
  23. <PropertyRef Name="Id" />
  24. </Key>
  25. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  26. <Property Name="Price" Type="Double" Nullable="false" />
  27. <Property Name="CountProduct" Type="Int32" Nullable="false" />
  28. <Property Name="IdPickPoint" Type="Int32" Nullable="false" />
  29. <Property Name="Date" Type="DateTime" Precision="0" />
  30. <NavigationProperty Name="PickPoint" Relationship="TestProductModel.FK_Basket_PickPoint" FromRole="Basket" ToRole="PickPoint" />
  31. <NavigationProperty Name="ProductBaskets" Relationship="TestProductModel.FK_ProductBaskets_Basket" FromRole="Basket" ToRole="ProductBaskets" />
  32. </EntityType>
  33. <EntityType Name="PickPoint">
  34. <Key>
  35. <PropertyRef Name="Id" />
  36. </Key>
  37. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  38. <Property Name="Kind" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
  39. <NavigationProperty Name="Basket" Relationship="TestProductModel.FK_Basket_PickPoint" FromRole="PickPoint" ToRole="Basket" />
  40. </EntityType>
  41. <EntityType Name="Product">
  42. <Key>
  43. <PropertyRef Name="Id" />
  44. </Key>
  45. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  46. <Property Name="ProductName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  47. <Property Name="ProductDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  48. <Property Name="ProductPhoto" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  49. <Property Name="ProductCost" Type="Double" Nullable="false" />
  50. <Property Name="ProductDiscount" Type="Int32" />
  51. <NavigationProperty Name="ProductBaskets" Relationship="TestProductModel.FK_ProductBaskets_Product" FromRole="Product" ToRole="ProductBaskets" />
  52. </EntityType>
  53. <EntityType Name="ProductBaskets">
  54. <Key>
  55. <PropertyRef Name="Id" />
  56. </Key>
  57. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  58. <Property Name="IdProduct" Type="Int32" Nullable="false" />
  59. <Property Name="IdBasket" Type="Int32" Nullable="false" />
  60. <NavigationProperty Name="Basket" Relationship="TestProductModel.FK_ProductBaskets_Basket" FromRole="ProductBaskets" ToRole="Basket" />
  61. <NavigationProperty Name="Product" Relationship="TestProductModel.FK_ProductBaskets_Product" FromRole="ProductBaskets" ToRole="Product" />
  62. </EntityType>
  63. <Association Name="FK_Basket_PickPoint">
  64. <End Type="TestProductModel.PickPoint" Role="PickPoint" Multiplicity="1" />
  65. <End Type="TestProductModel.Basket" Role="Basket" Multiplicity="*" />
  66. <ReferentialConstraint>
  67. <Principal Role="PickPoint">
  68. <PropertyRef Name="Id" />
  69. </Principal>
  70. <Dependent Role="Basket">
  71. <PropertyRef Name="IdPickPoint" />
  72. </Dependent>
  73. </ReferentialConstraint>
  74. </Association>
  75. <Association Name="FK_ProductBaskets_Basket">
  76. <End Type="TestProductModel.Basket" Role="Basket" Multiplicity="1" />
  77. <End Type="TestProductModel.ProductBaskets" Role="ProductBaskets" Multiplicity="*" />
  78. <ReferentialConstraint>
  79. <Principal Role="Basket">
  80. <PropertyRef Name="Id" />
  81. </Principal>
  82. <Dependent Role="ProductBaskets">
  83. <PropertyRef Name="IdBasket" />
  84. </Dependent>
  85. </ReferentialConstraint>
  86. </Association>
  87. <Association Name="FK_ProductBaskets_Product">
  88. <End Type="TestProductModel.Product" Role="Product" Multiplicity="1" />
  89. <End Type="TestProductModel.ProductBaskets" Role="ProductBaskets" Multiplicity="*" />
  90. <ReferentialConstraint>
  91. <Principal Role="Product">
  92. <PropertyRef Name="Id" />
  93. </Principal>
  94. <Dependent Role="ProductBaskets">
  95. <PropertyRef Name="IdProduct" />
  96. </Dependent>
  97. </ReferentialConstraint>
  98. </Association>
  99. </Schema>