Model1.edmx 17 KB

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