Model1.edmx 17 KB

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