BaseData.edmx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  3. <!-- EF Runtime content -->
  4. <edmx:Runtime>
  5. <!-- SSDL content -->
  6. <edmx:StorageModels>
  7. <Schema Namespace="Хранилище option2Model" 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">
  8. <EntityType Name="Material">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  14. <Property Name="CountInPack" Type="int" Nullable="false" />
  15. <Property Name="Unit" Type="nvarchar" MaxLength="10" Nullable="false" />
  16. <Property Name="CountinStock" Type="float" />
  17. <Property Name="MinCount" Type="float" Nullable="false" />
  18. <Property Name="Description" Type="nvarchar(max)" />
  19. <Property Name="Cost" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  20. <Property Name="Image" Type="nchar" MaxLength="100" />
  21. <Property Name="MaterialTypeId" Type="int" Nullable="false" />
  22. </EntityType>
  23. <EntityType Name="MaterialSupplier">
  24. <Key>
  25. <PropertyRef Name="ID" />
  26. </Key>
  27. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  28. <Property Name="MaterialID" Type="int" Nullable="false" />
  29. <Property Name="SupplierID" Type="int" Nullable="false" />
  30. </EntityType>
  31. <EntityType Name="MaterialType">
  32. <Key>
  33. <PropertyRef Name="ID" />
  34. </Key>
  35. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  36. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  37. </EntityType>
  38. <EntityType Name="Supplier">
  39. <Key>
  40. <PropertyRef Name="ID" />
  41. </Key>
  42. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  43. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  44. <Property Name="INN" Type="nvarchar" MaxLength="12" Nullable="false" />
  45. <Property Name="StartDate" Type="date" Nullable="false" />
  46. <Property Name="QualityRating" Type="int" />
  47. <Property Name="SupplierType" Type="int" Nullable="false" />
  48. </EntityType>
  49. <EntityType Name="SupplierType">
  50. <Key>
  51. <PropertyRef Name="ID" />
  52. </Key>
  53. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  54. <Property Name="Title" Type="nchar" MaxLength="50" Nullable="false" />
  55. </EntityType>
  56. <Association Name="FK_Material_MaterialType">
  57. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  58. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  59. <ReferentialConstraint>
  60. <Principal Role="MaterialType">
  61. <PropertyRef Name="ID" />
  62. </Principal>
  63. <Dependent Role="Material">
  64. <PropertyRef Name="MaterialTypeId" />
  65. </Dependent>
  66. </ReferentialConstraint>
  67. </Association>
  68. <Association Name="FK_MaterialSupplier_Material">
  69. <End Role="Material" Type="Self.Material" Multiplicity="1">
  70. <OnDelete Action="Cascade" />
  71. </End>
  72. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  73. <ReferentialConstraint>
  74. <Principal Role="Material">
  75. <PropertyRef Name="ID" />
  76. </Principal>
  77. <Dependent Role="MaterialSupplier">
  78. <PropertyRef Name="MaterialID" />
  79. </Dependent>
  80. </ReferentialConstraint>
  81. </Association>
  82. <Association Name="FK_MaterialSupplier_Supplier">
  83. <End Role="Supplier" Type="Self.Supplier" Multiplicity="1">
  84. <OnDelete Action="Cascade" />
  85. </End>
  86. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  87. <ReferentialConstraint>
  88. <Principal Role="Supplier">
  89. <PropertyRef Name="ID" />
  90. </Principal>
  91. <Dependent Role="MaterialSupplier">
  92. <PropertyRef Name="SupplierID" />
  93. </Dependent>
  94. </ReferentialConstraint>
  95. </Association>
  96. <Association Name="FK_Supplier_SupplierType">
  97. <End Role="SupplierType" Type="Self.SupplierType" Multiplicity="1" />
  98. <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
  99. <ReferentialConstraint>
  100. <Principal Role="SupplierType">
  101. <PropertyRef Name="ID" />
  102. </Principal>
  103. <Dependent Role="Supplier">
  104. <PropertyRef Name="SupplierType" />
  105. </Dependent>
  106. </ReferentialConstraint>
  107. </Association>
  108. <EntityContainer Name="Хранилище option2ModelContainer">
  109. <EntitySet Name="Material" EntityType="Self.Material" Schema="dbo" store:Type="Tables" />
  110. <EntitySet Name="MaterialSupplier" EntityType="Self.MaterialSupplier" Schema="dbo" store:Type="Tables" />
  111. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" Schema="dbo" store:Type="Tables" />
  112. <EntitySet Name="Supplier" EntityType="Self.Supplier" Schema="dbo" store:Type="Tables" />
  113. <EntitySet Name="SupplierType" EntityType="Self.SupplierType" Schema="dbo" store:Type="Tables" />
  114. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  115. <End Role="MaterialType" EntitySet="MaterialType" />
  116. <End Role="Material" EntitySet="Material" />
  117. </AssociationSet>
  118. <AssociationSet Name="FK_MaterialSupplier_Material" Association="Self.FK_MaterialSupplier_Material">
  119. <End Role="Material" EntitySet="Material" />
  120. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  121. </AssociationSet>
  122. <AssociationSet Name="FK_MaterialSupplier_Supplier" Association="Self.FK_MaterialSupplier_Supplier">
  123. <End Role="Supplier" EntitySet="Supplier" />
  124. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  125. </AssociationSet>
  126. <AssociationSet Name="FK_Supplier_SupplierType" Association="Self.FK_Supplier_SupplierType">
  127. <End Role="SupplierType" EntitySet="SupplierType" />
  128. <End Role="Supplier" EntitySet="Supplier" />
  129. </AssociationSet>
  130. </EntityContainer>
  131. </Schema>
  132. </edmx:StorageModels>
  133. <!-- CSDL content -->
  134. <edmx:ConceptualModels>
  135. <Schema Namespace="option2Model" 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">
  136. <EntityType Name="Material">
  137. <Key>
  138. <PropertyRef Name="ID" />
  139. </Key>
  140. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  141. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  142. <Property Name="CountInPack" Type="Int32" Nullable="false" />
  143. <Property Name="Unit" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  144. <Property Name="CountinStock" Type="Double" />
  145. <Property Name="MinCount" Type="Double" Nullable="false" />
  146. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  147. <Property Name="Cost" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  148. <Property Name="Image" Type="String" MaxLength="100" FixedLength="true" Unicode="true" />
  149. <Property Name="MaterialTypeId" Type="Int32" Nullable="false" />
  150. <NavigationProperty Name="MaterialType" Relationship="Self.FK_Material_MaterialType" FromRole="Material" ToRole="MaterialType" />
  151. <NavigationProperty Name="MaterialSupplier" Relationship="Self.FK_MaterialSupplier_Material" FromRole="Material" ToRole="MaterialSupplier" />
  152. </EntityType>
  153. <EntityType Name="MaterialSupplier">
  154. <Key>
  155. <PropertyRef Name="ID" />
  156. </Key>
  157. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  158. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  159. <Property Name="SupplierID" Type="Int32" Nullable="false" />
  160. <NavigationProperty Name="Material" Relationship="Self.FK_MaterialSupplier_Material" FromRole="MaterialSupplier" ToRole="Material" />
  161. <NavigationProperty Name="Supplier" Relationship="Self.FK_MaterialSupplier_Supplier" FromRole="MaterialSupplier" ToRole="Supplier" />
  162. </EntityType>
  163. <EntityType Name="MaterialType">
  164. <Key>
  165. <PropertyRef Name="ID" />
  166. </Key>
  167. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  168. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  169. <NavigationProperty Name="Material" Relationship="Self.FK_Material_MaterialType" FromRole="MaterialType" ToRole="Material" />
  170. </EntityType>
  171. <EntityType Name="Supplier">
  172. <Key>
  173. <PropertyRef Name="ID" />
  174. </Key>
  175. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  176. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  177. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="true" Nullable="false" />
  178. <Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
  179. <Property Name="QualityRating" Type="Int32" />
  180. <Property Name="SupplierType" Type="Int32" Nullable="false" />
  181. <NavigationProperty Name="MaterialSupplier" Relationship="Self.FK_MaterialSupplier_Supplier" FromRole="Supplier" ToRole="MaterialSupplier" />
  182. <NavigationProperty Name="SupplierType1" Relationship="Self.FK_Supplier_SupplierType" FromRole="Supplier" ToRole="SupplierType" />
  183. </EntityType>
  184. <EntityType Name="SupplierType">
  185. <Key>
  186. <PropertyRef Name="ID" />
  187. </Key>
  188. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  189. <Property Name="Title" Type="String" MaxLength="50" FixedLength="true" Unicode="true" Nullable="false" />
  190. <NavigationProperty Name="Supplier" Relationship="Self.FK_Supplier_SupplierType" FromRole="SupplierType" ToRole="Supplier" />
  191. </EntityType>
  192. <Association Name="FK_Material_MaterialType">
  193. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  194. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  195. <ReferentialConstraint>
  196. <Principal Role="MaterialType">
  197. <PropertyRef Name="ID" />
  198. </Principal>
  199. <Dependent Role="Material">
  200. <PropertyRef Name="MaterialTypeId" />
  201. </Dependent>
  202. </ReferentialConstraint>
  203. </Association>
  204. <Association Name="FK_MaterialSupplier_Material">
  205. <End Role="Material" Type="Self.Material" Multiplicity="1">
  206. <OnDelete Action="Cascade" />
  207. </End>
  208. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  209. <ReferentialConstraint>
  210. <Principal Role="Material">
  211. <PropertyRef Name="ID" />
  212. </Principal>
  213. <Dependent Role="MaterialSupplier">
  214. <PropertyRef Name="MaterialID" />
  215. </Dependent>
  216. </ReferentialConstraint>
  217. </Association>
  218. <Association Name="FK_MaterialSupplier_Supplier">
  219. <End Role="Supplier" Type="Self.Supplier" Multiplicity="1">
  220. <OnDelete Action="Cascade" />
  221. </End>
  222. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  223. <ReferentialConstraint>
  224. <Principal Role="Supplier">
  225. <PropertyRef Name="ID" />
  226. </Principal>
  227. <Dependent Role="MaterialSupplier">
  228. <PropertyRef Name="SupplierID" />
  229. </Dependent>
  230. </ReferentialConstraint>
  231. </Association>
  232. <Association Name="FK_Supplier_SupplierType">
  233. <End Role="SupplierType" Type="Self.SupplierType" Multiplicity="1" />
  234. <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
  235. <ReferentialConstraint>
  236. <Principal Role="SupplierType">
  237. <PropertyRef Name="ID" />
  238. </Principal>
  239. <Dependent Role="Supplier">
  240. <PropertyRef Name="SupplierType" />
  241. </Dependent>
  242. </ReferentialConstraint>
  243. </Association>
  244. <EntityContainer Name="BaseDate" annotation:LazyLoadingEnabled="true">
  245. <EntitySet Name="Material" EntityType="Self.Material" />
  246. <EntitySet Name="MaterialSupplier" EntityType="Self.MaterialSupplier" />
  247. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" />
  248. <EntitySet Name="Supplier" EntityType="Self.Supplier" />
  249. <EntitySet Name="SupplierType" EntityType="Self.SupplierType" />
  250. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  251. <End Role="MaterialType" EntitySet="MaterialType" />
  252. <End Role="Material" EntitySet="Material" />
  253. </AssociationSet>
  254. <AssociationSet Name="FK_MaterialSupplier_Material" Association="Self.FK_MaterialSupplier_Material">
  255. <End Role="Material" EntitySet="Material" />
  256. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  257. </AssociationSet>
  258. <AssociationSet Name="FK_MaterialSupplier_Supplier" Association="Self.FK_MaterialSupplier_Supplier">
  259. <End Role="Supplier" EntitySet="Supplier" />
  260. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_Supplier_SupplierType" Association="Self.FK_Supplier_SupplierType">
  263. <End Role="SupplierType" EntitySet="SupplierType" />
  264. <End Role="Supplier" EntitySet="Supplier" />
  265. </AssociationSet>
  266. </EntityContainer>
  267. </Schema>
  268. </edmx:ConceptualModels>
  269. <!-- C-S mapping content -->
  270. <edmx:Mappings>
  271. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  272. <EntityContainerMapping StorageEntityContainer="Хранилище option2ModelContainer" CdmEntityContainer="BaseDate">
  273. <EntitySetMapping Name="Material">
  274. <EntityTypeMapping TypeName="option2Model.Material">
  275. <MappingFragment StoreEntitySet="Material">
  276. <ScalarProperty Name="ID" ColumnName="ID" />
  277. <ScalarProperty Name="Title" ColumnName="Title" />
  278. <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
  279. <ScalarProperty Name="Unit" ColumnName="Unit" />
  280. <ScalarProperty Name="CountinStock" ColumnName="CountinStock" />
  281. <ScalarProperty Name="MinCount" ColumnName="MinCount" />
  282. <ScalarProperty Name="Description" ColumnName="Description" />
  283. <ScalarProperty Name="Cost" ColumnName="Cost" />
  284. <ScalarProperty Name="Image" ColumnName="Image" />
  285. <ScalarProperty Name="MaterialTypeId" ColumnName="MaterialTypeId" />
  286. </MappingFragment>
  287. </EntityTypeMapping>
  288. </EntitySetMapping>
  289. <EntitySetMapping Name="MaterialSupplier">
  290. <EntityTypeMapping TypeName="option2Model.MaterialSupplier">
  291. <MappingFragment StoreEntitySet="MaterialSupplier">
  292. <ScalarProperty Name="ID" ColumnName="ID" />
  293. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  294. <ScalarProperty Name="SupplierID" ColumnName="SupplierID" />
  295. </MappingFragment>
  296. </EntityTypeMapping>
  297. </EntitySetMapping>
  298. <EntitySetMapping Name="MaterialType">
  299. <EntityTypeMapping TypeName="option2Model.MaterialType">
  300. <MappingFragment StoreEntitySet="MaterialType">
  301. <ScalarProperty Name="ID" ColumnName="ID" />
  302. <ScalarProperty Name="Title" ColumnName="Title" />
  303. </MappingFragment>
  304. </EntityTypeMapping>
  305. </EntitySetMapping>
  306. <EntitySetMapping Name="Supplier">
  307. <EntityTypeMapping TypeName="option2Model.Supplier">
  308. <MappingFragment StoreEntitySet="Supplier">
  309. <ScalarProperty Name="ID" ColumnName="ID" />
  310. <ScalarProperty Name="Title" ColumnName="Title" />
  311. <ScalarProperty Name="INN" ColumnName="INN" />
  312. <ScalarProperty Name="StartDate" ColumnName="StartDate" />
  313. <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
  314. <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
  315. </MappingFragment>
  316. </EntityTypeMapping>
  317. </EntitySetMapping>
  318. <EntitySetMapping Name="SupplierType">
  319. <EntityTypeMapping TypeName="option2Model.SupplierType">
  320. <MappingFragment StoreEntitySet="SupplierType">
  321. <ScalarProperty Name="ID" ColumnName="ID" />
  322. <ScalarProperty Name="Title" ColumnName="Title" />
  323. </MappingFragment>
  324. </EntityTypeMapping>
  325. </EntitySetMapping>
  326. </EntityContainerMapping>
  327. </Mapping>
  328. </edmx:Mappings>
  329. </edmx:Runtime>
  330. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  331. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  332. <Connection>
  333. <DesignerInfoPropertySet>
  334. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  335. </DesignerInfoPropertySet>
  336. </Connection>
  337. <Options>
  338. <DesignerInfoPropertySet>
  339. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  340. <DesignerProperty Name="EnablePluralization" Value="false" />
  341. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  342. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  343. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  344. </DesignerInfoPropertySet>
  345. </Options>
  346. <!-- Diagram content (shape and connector positions) -->
  347. <Diagrams></Diagrams>
  348. </Designer>
  349. </edmx:Edmx>