Model1.edmx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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="Хранилище PsychoTestsModel" 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="Answers">
  9. <Key>
  10. <PropertyRef Name="Answer_id" />
  11. </Key>
  12. <Property Name="Answer_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Answer_name" Type="varchar(max)" Nullable="false" />
  14. </EntityType>
  15. <EntityType Name="Categories">
  16. <Key>
  17. <PropertyRef Name="Category_id" />
  18. </Key>
  19. <Property Name="Category_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  20. <Property Name="Category_name" Type="varchar(max)" Nullable="false" />
  21. </EntityType>
  22. <EntityType Name="Questions">
  23. <Key>
  24. <PropertyRef Name="Question_id" />
  25. </Key>
  26. <Property Name="Question_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  27. <Property Name="Content" Type="varchar(max)" />
  28. <Property Name="Id_test" Type="int" />
  29. <Property Name="Id_answer" Type="int" />
  30. </EntityType>
  31. <EntityType Name="Results">
  32. <Key>
  33. <PropertyRef Name="Result_id" />
  34. </Key>
  35. <Property Name="Result_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  36. <Property Name="Result_name" Type="varchar(max)" Nullable="false" />
  37. <Property Name="Description" Type="varchar(max)" />
  38. <Property Name="Id_test" Type="int" />
  39. <Property Name="Score_count" Type="int" Nullable="false" />
  40. </EntityType>
  41. <EntityType Name="Roles">
  42. <Key>
  43. <PropertyRef Name="Role_id" />
  44. </Key>
  45. <Property Name="Role_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  46. <Property Name="Role_name" Type="varchar" MaxLength="50" Nullable="false" />
  47. </EntityType>
  48. <EntityType Name="Tests">
  49. <Key>
  50. <PropertyRef Name="Test_id" />
  51. </Key>
  52. <Property Name="Test_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  53. <Property Name="Test_name" Type="varchar" MaxLength="50" Nullable="false" />
  54. <Property Name="Questions_count" Type="int" />
  55. <Property Name="Description" Type="varchar(max)" />
  56. <Property Name="Image" Type="varbinary(max)" />
  57. <Property Name="Id_category" Type="int" />
  58. </EntityType>
  59. <EntityType Name="Users">
  60. <Key>
  61. <PropertyRef Name="User_id" />
  62. </Key>
  63. <Property Name="User_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  64. <Property Name="Login" Type="varchar" MaxLength="50" Nullable="false" />
  65. <Property Name="Password" Type="varchar" MaxLength="50" Nullable="false" />
  66. <Property Name="Id_role" Type="int" Nullable="false" />
  67. <Property Name="Surname" Type="varchar" MaxLength="50" Nullable="false" />
  68. <Property Name="Name" Type="varchar" MaxLength="50" Nullable="false" />
  69. <Property Name="Patronymic" Type="varchar" MaxLength="50" />
  70. <Property Name="Id_doctor" Type="int" />
  71. </EntityType>
  72. <EntityType Name="Users_Tests">
  73. <Key>
  74. <PropertyRef Name="Id" />
  75. </Key>
  76. <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  77. <Property Name="Id_user" Type="int" Nullable="false" />
  78. <Property Name="Id_result" Type="int" Nullable="false" />
  79. </EntityType>
  80. <Association Name="FK_Questions_Answers">
  81. <End Role="Answers" Type="Self.Answers" Multiplicity="0..1" />
  82. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  83. <ReferentialConstraint>
  84. <Principal Role="Answers">
  85. <PropertyRef Name="Answer_id" />
  86. </Principal>
  87. <Dependent Role="Questions">
  88. <PropertyRef Name="Id_answer" />
  89. </Dependent>
  90. </ReferentialConstraint>
  91. </Association>
  92. <Association Name="FK_Questions_Tests">
  93. <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
  94. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  95. <ReferentialConstraint>
  96. <Principal Role="Tests">
  97. <PropertyRef Name="Test_id" />
  98. </Principal>
  99. <Dependent Role="Questions">
  100. <PropertyRef Name="Id_test" />
  101. </Dependent>
  102. </ReferentialConstraint>
  103. </Association>
  104. <Association Name="FK_Results_Tests">
  105. <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
  106. <End Role="Results" Type="Self.Results" Multiplicity="*" />
  107. <ReferentialConstraint>
  108. <Principal Role="Tests">
  109. <PropertyRef Name="Test_id" />
  110. </Principal>
  111. <Dependent Role="Results">
  112. <PropertyRef Name="Id_test" />
  113. </Dependent>
  114. </ReferentialConstraint>
  115. </Association>
  116. <Association Name="FK_Tests_Categories">
  117. <End Role="Categories" Type="Self.Categories" Multiplicity="0..1" />
  118. <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
  119. <ReferentialConstraint>
  120. <Principal Role="Categories">
  121. <PropertyRef Name="Category_id" />
  122. </Principal>
  123. <Dependent Role="Tests">
  124. <PropertyRef Name="Id_category" />
  125. </Dependent>
  126. </ReferentialConstraint>
  127. </Association>
  128. <Association Name="FK_Users_Roles">
  129. <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
  130. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  131. <ReferentialConstraint>
  132. <Principal Role="Roles">
  133. <PropertyRef Name="Role_id" />
  134. </Principal>
  135. <Dependent Role="Users">
  136. <PropertyRef Name="Id_role" />
  137. </Dependent>
  138. </ReferentialConstraint>
  139. </Association>
  140. <Association Name="FK_Users_Tests_Results">
  141. <End Role="Results" Type="Self.Results" Multiplicity="1">
  142. <OnDelete Action="Cascade" />
  143. </End>
  144. <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
  145. <ReferentialConstraint>
  146. <Principal Role="Results">
  147. <PropertyRef Name="Result_id" />
  148. </Principal>
  149. <Dependent Role="Users_Tests">
  150. <PropertyRef Name="Id_result" />
  151. </Dependent>
  152. </ReferentialConstraint>
  153. </Association>
  154. <Association Name="FK_Users_Tests_Users">
  155. <End Role="Users" Type="Self.Users" Multiplicity="1">
  156. <OnDelete Action="Cascade" />
  157. </End>
  158. <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
  159. <ReferentialConstraint>
  160. <Principal Role="Users">
  161. <PropertyRef Name="User_id" />
  162. </Principal>
  163. <Dependent Role="Users_Tests">
  164. <PropertyRef Name="Id_user" />
  165. </Dependent>
  166. </ReferentialConstraint>
  167. </Association>
  168. <EntityContainer Name="Хранилище PsychoTestsModelContainer">
  169. <EntitySet Name="Answers" EntityType="Self.Answers" Schema="dbo" store:Type="Tables" />
  170. <EntitySet Name="Categories" EntityType="Self.Categories" Schema="dbo" store:Type="Tables" />
  171. <EntitySet Name="Questions" EntityType="Self.Questions" Schema="dbo" store:Type="Tables" />
  172. <EntitySet Name="Results" EntityType="Self.Results" Schema="dbo" store:Type="Tables" />
  173. <EntitySet Name="Roles" EntityType="Self.Roles" Schema="dbo" store:Type="Tables" />
  174. <EntitySet Name="Tests" EntityType="Self.Tests" Schema="dbo" store:Type="Tables" />
  175. <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
  176. <EntitySet Name="Users_Tests" EntityType="Self.Users_Tests" Schema="dbo" store:Type="Tables" />
  177. <AssociationSet Name="FK_Questions_Answers" Association="Self.FK_Questions_Answers">
  178. <End Role="Answers" EntitySet="Answers" />
  179. <End Role="Questions" EntitySet="Questions" />
  180. </AssociationSet>
  181. <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
  182. <End Role="Tests" EntitySet="Tests" />
  183. <End Role="Questions" EntitySet="Questions" />
  184. </AssociationSet>
  185. <AssociationSet Name="FK_Results_Tests" Association="Self.FK_Results_Tests">
  186. <End Role="Tests" EntitySet="Tests" />
  187. <End Role="Results" EntitySet="Results" />
  188. </AssociationSet>
  189. <AssociationSet Name="FK_Tests_Categories" Association="Self.FK_Tests_Categories">
  190. <End Role="Categories" EntitySet="Categories" />
  191. <End Role="Tests" EntitySet="Tests" />
  192. </AssociationSet>
  193. <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
  194. <End Role="Roles" EntitySet="Roles" />
  195. <End Role="Users" EntitySet="Users" />
  196. </AssociationSet>
  197. <AssociationSet Name="FK_Users_Tests_Results" Association="Self.FK_Users_Tests_Results">
  198. <End Role="Results" EntitySet="Results" />
  199. <End Role="Users_Tests" EntitySet="Users_Tests" />
  200. </AssociationSet>
  201. <AssociationSet Name="FK_Users_Tests_Users" Association="Self.FK_Users_Tests_Users">
  202. <End Role="Users" EntitySet="Users" />
  203. <End Role="Users_Tests" EntitySet="Users_Tests" />
  204. </AssociationSet>
  205. </EntityContainer>
  206. </Schema></edmx:StorageModels>
  207. <!-- CSDL content -->
  208. <edmx:ConceptualModels>
  209. <Schema Namespace="PsychoTestsModel" 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">
  210. <EntityType Name="Answers">
  211. <Key>
  212. <PropertyRef Name="Answer_id" />
  213. </Key>
  214. <Property Name="Answer_id" Type="Int32" Nullable="false" />
  215. <Property Name="Answer_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
  216. <NavigationProperty Name="Questions" Relationship="Self.FK_Questions_Answers" FromRole="Answers" ToRole="Questions" />
  217. </EntityType>
  218. <EntityType Name="Categories">
  219. <Key>
  220. <PropertyRef Name="Category_id" />
  221. </Key>
  222. <Property Name="Category_id" Type="Int32" Nullable="false" />
  223. <Property Name="Category_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
  224. <NavigationProperty Name="Tests" Relationship="Self.FK_Tests_Categories" FromRole="Categories" ToRole="Tests" />
  225. </EntityType>
  226. <EntityType Name="Questions">
  227. <Key>
  228. <PropertyRef Name="Question_id" />
  229. </Key>
  230. <Property Name="Question_id" Type="Int32" Nullable="false" />
  231. <Property Name="Content" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
  232. <Property Name="Id_test" Type="Int32" />
  233. <Property Name="Id_answer" Type="Int32" />
  234. <NavigationProperty Name="Answers" Relationship="Self.FK_Questions_Answers" FromRole="Questions" ToRole="Answers" />
  235. <NavigationProperty Name="Tests" Relationship="Self.FK_Questions_Tests" FromRole="Questions" ToRole="Tests" />
  236. </EntityType>
  237. <EntityType Name="Results">
  238. <Key>
  239. <PropertyRef Name="Result_id" />
  240. </Key>
  241. <Property Name="Result_id" Type="Int32" Nullable="false" />
  242. <Property Name="Result_name" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
  243. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
  244. <Property Name="Id_test" Type="Int32" />
  245. <Property Name="Score_count" Type="Int32" Nullable="false" />
  246. <NavigationProperty Name="Tests" Relationship="Self.FK_Results_Tests" FromRole="Results" ToRole="Tests" />
  247. <NavigationProperty Name="Users_Tests" Relationship="PsychoTestsModel.FK_Users_Tests_Results" FromRole="Results" ToRole="Users_Tests" />
  248. </EntityType>
  249. <EntityType Name="Roles">
  250. <Key>
  251. <PropertyRef Name="Role_id" />
  252. </Key>
  253. <Property Name="Role_id" Type="Int32" Nullable="false" />
  254. <Property Name="Role_name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  255. <NavigationProperty Name="Users" Relationship="Self.FK_Users_Roles" FromRole="Roles" ToRole="Users" />
  256. </EntityType>
  257. <EntityType Name="Tests">
  258. <Key>
  259. <PropertyRef Name="Test_id" />
  260. </Key>
  261. <Property Name="Test_id" Type="Int32" Nullable="false" />
  262. <Property Name="Test_name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  263. <Property Name="Questions_count" Type="Int32" />
  264. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
  265. <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
  266. <Property Name="Id_category" Type="Int32" />
  267. <NavigationProperty Name="Categories" Relationship="Self.FK_Tests_Categories" FromRole="Tests" ToRole="Categories" />
  268. <NavigationProperty Name="Questions" Relationship="Self.FK_Questions_Tests" FromRole="Tests" ToRole="Questions" />
  269. <NavigationProperty Name="Results" Relationship="Self.FK_Results_Tests" FromRole="Tests" ToRole="Results" />
  270. </EntityType>
  271. <EntityType Name="Users">
  272. <Key>
  273. <PropertyRef Name="User_id" />
  274. </Key>
  275. <Property Name="User_id" Type="Int32" Nullable="false" />
  276. <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  277. <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  278. <Property Name="Id_role" Type="Int32" Nullable="false" />
  279. <Property Name="Surname" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  280. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  281. <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
  282. <Property Name="Id_doctor" Type="Int32" />
  283. <NavigationProperty Name="Roles" Relationship="Self.FK_Users_Roles" FromRole="Users" ToRole="Roles" />
  284. <NavigationProperty Name="Users_Tests" Relationship="Self.FK_Users_Tests_Users" FromRole="Users" ToRole="Users_Tests" />
  285. </EntityType>
  286. <EntityType Name="Users_Tests">
  287. <Key>
  288. <PropertyRef Name="Id" />
  289. </Key>
  290. <Property Name="Id" Type="Int32" Nullable="false" />
  291. <Property Name="Id_user" Type="Int32" Nullable="false" />
  292. <NavigationProperty Name="Users" Relationship="Self.FK_Users_Tests_Users" FromRole="Users_Tests" ToRole="Users" />
  293. <Property Name="Id_result" Type="Int32" Nullable="false" />
  294. <NavigationProperty Name="Results" Relationship="PsychoTestsModel.FK_Users_Tests_Results" FromRole="Users_Tests" ToRole="Results" />
  295. </EntityType>
  296. <Association Name="FK_Questions_Answers">
  297. <End Role="Answers" Type="Self.Answers" Multiplicity="0..1" />
  298. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  299. <ReferentialConstraint>
  300. <Principal Role="Answers">
  301. <PropertyRef Name="Answer_id" />
  302. </Principal>
  303. <Dependent Role="Questions">
  304. <PropertyRef Name="Id_answer" />
  305. </Dependent>
  306. </ReferentialConstraint>
  307. </Association>
  308. <Association Name="FK_Tests_Categories">
  309. <End Role="Categories" Type="Self.Categories" Multiplicity="0..1" />
  310. <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
  311. <ReferentialConstraint>
  312. <Principal Role="Categories">
  313. <PropertyRef Name="Category_id" />
  314. </Principal>
  315. <Dependent Role="Tests">
  316. <PropertyRef Name="Id_category" />
  317. </Dependent>
  318. </ReferentialConstraint>
  319. </Association>
  320. <Association Name="FK_Questions_Tests">
  321. <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
  322. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  323. <ReferentialConstraint>
  324. <Principal Role="Tests">
  325. <PropertyRef Name="Test_id" />
  326. </Principal>
  327. <Dependent Role="Questions">
  328. <PropertyRef Name="Id_test" />
  329. </Dependent>
  330. </ReferentialConstraint>
  331. </Association>
  332. <Association Name="FK_Results_Tests">
  333. <End Role="Tests" Type="Self.Tests" Multiplicity="0..1" />
  334. <End Role="Results" Type="Self.Results" Multiplicity="*" />
  335. <ReferentialConstraint>
  336. <Principal Role="Tests">
  337. <PropertyRef Name="Test_id" />
  338. </Principal>
  339. <Dependent Role="Results">
  340. <PropertyRef Name="Id_test" />
  341. </Dependent>
  342. </ReferentialConstraint>
  343. </Association>
  344. <Association Name="FK_Users_Roles">
  345. <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
  346. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  347. <ReferentialConstraint>
  348. <Principal Role="Roles">
  349. <PropertyRef Name="Role_id" />
  350. </Principal>
  351. <Dependent Role="Users">
  352. <PropertyRef Name="Id_role" />
  353. </Dependent>
  354. </ReferentialConstraint>
  355. </Association>
  356. <Association Name="FK_Users_Tests_Users">
  357. <End Role="Users" Type="Self.Users" Multiplicity="1">
  358. <OnDelete Action="Cascade" />
  359. </End>
  360. <End Role="Users_Tests" Type="Self.Users_Tests" Multiplicity="*" />
  361. <ReferentialConstraint>
  362. <Principal Role="Users">
  363. <PropertyRef Name="User_id" />
  364. </Principal>
  365. <Dependent Role="Users_Tests">
  366. <PropertyRef Name="Id_user" />
  367. </Dependent>
  368. </ReferentialConstraint>
  369. </Association>
  370. <EntityContainer Name="PsychoBase" annotation:LazyLoadingEnabled="true">
  371. <EntitySet Name="Answers" EntityType="Self.Answers" />
  372. <EntitySet Name="Categories" EntityType="Self.Categories" />
  373. <EntitySet Name="Questions" EntityType="Self.Questions" />
  374. <EntitySet Name="Results" EntityType="Self.Results" />
  375. <EntitySet Name="Roles" EntityType="Self.Roles" />
  376. <EntitySet Name="Tests" EntityType="Self.Tests" />
  377. <EntitySet Name="Users" EntityType="Self.Users" />
  378. <EntitySet Name="Users_Tests" EntityType="Self.Users_Tests" />
  379. <AssociationSet Name="FK_Questions_Answers" Association="Self.FK_Questions_Answers">
  380. <End Role="Answers" EntitySet="Answers" />
  381. <End Role="Questions" EntitySet="Questions" />
  382. </AssociationSet>
  383. <AssociationSet Name="FK_Tests_Categories" Association="Self.FK_Tests_Categories">
  384. <End Role="Categories" EntitySet="Categories" />
  385. <End Role="Tests" EntitySet="Tests" />
  386. </AssociationSet>
  387. <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
  388. <End Role="Tests" EntitySet="Tests" />
  389. <End Role="Questions" EntitySet="Questions" />
  390. </AssociationSet>
  391. <AssociationSet Name="FK_Results_Tests" Association="Self.FK_Results_Tests">
  392. <End Role="Tests" EntitySet="Tests" />
  393. <End Role="Results" EntitySet="Results" />
  394. </AssociationSet>
  395. <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
  396. <End Role="Roles" EntitySet="Roles" />
  397. <End Role="Users" EntitySet="Users" />
  398. </AssociationSet>
  399. <AssociationSet Name="FK_Users_Tests_Users" Association="Self.FK_Users_Tests_Users">
  400. <End Role="Users" EntitySet="Users" />
  401. <End Role="Users_Tests" EntitySet="Users_Tests" />
  402. </AssociationSet>
  403. <AssociationSet Name="FK_Users_Tests_Results" Association="PsychoTestsModel.FK_Users_Tests_Results">
  404. <End Role="Results" EntitySet="Results" />
  405. <End Role="Users_Tests" EntitySet="Users_Tests" />
  406. </AssociationSet>
  407. </EntityContainer>
  408. <Association Name="FK_Users_Tests_Results">
  409. <End Type="PsychoTestsModel.Results" Role="Results" Multiplicity="1">
  410. <OnDelete Action="Cascade" />
  411. </End>
  412. <End Type="PsychoTestsModel.Users_Tests" Role="Users_Tests" Multiplicity="*" />
  413. <ReferentialConstraint>
  414. <Principal Role="Results">
  415. <PropertyRef Name="Result_id" />
  416. </Principal>
  417. <Dependent Role="Users_Tests">
  418. <PropertyRef Name="Id_result" />
  419. </Dependent>
  420. </ReferentialConstraint>
  421. </Association>
  422. </Schema>
  423. </edmx:ConceptualModels>
  424. <!-- C-S mapping content -->
  425. <edmx:Mappings>
  426. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  427. <EntityContainerMapping StorageEntityContainer="Хранилище PsychoTestsModelContainer" CdmEntityContainer="PsychoBase">
  428. <EntitySetMapping Name="Answers">
  429. <EntityTypeMapping TypeName="PsychoTestsModel.Answers">
  430. <MappingFragment StoreEntitySet="Answers">
  431. <ScalarProperty Name="Answer_id" ColumnName="Answer_id" />
  432. <ScalarProperty Name="Answer_name" ColumnName="Answer_name" />
  433. </MappingFragment>
  434. </EntityTypeMapping>
  435. </EntitySetMapping>
  436. <EntitySetMapping Name="Categories">
  437. <EntityTypeMapping TypeName="PsychoTestsModel.Categories">
  438. <MappingFragment StoreEntitySet="Categories">
  439. <ScalarProperty Name="Category_id" ColumnName="Category_id" />
  440. <ScalarProperty Name="Category_name" ColumnName="Category_name" />
  441. </MappingFragment>
  442. </EntityTypeMapping>
  443. </EntitySetMapping>
  444. <EntitySetMapping Name="Questions">
  445. <EntityTypeMapping TypeName="PsychoTestsModel.Questions">
  446. <MappingFragment StoreEntitySet="Questions">
  447. <ScalarProperty Name="Question_id" ColumnName="Question_id" />
  448. <ScalarProperty Name="Content" ColumnName="Content" />
  449. <ScalarProperty Name="Id_test" ColumnName="Id_test" />
  450. <ScalarProperty Name="Id_answer" ColumnName="Id_answer" />
  451. </MappingFragment>
  452. </EntityTypeMapping>
  453. </EntitySetMapping>
  454. <EntitySetMapping Name="Results">
  455. <EntityTypeMapping TypeName="PsychoTestsModel.Results">
  456. <MappingFragment StoreEntitySet="Results">
  457. <ScalarProperty Name="Result_id" ColumnName="Result_id" />
  458. <ScalarProperty Name="Result_name" ColumnName="Result_name" />
  459. <ScalarProperty Name="Description" ColumnName="Description" />
  460. <ScalarProperty Name="Id_test" ColumnName="Id_test" />
  461. <ScalarProperty Name="Score_count" ColumnName="Score_count" />
  462. </MappingFragment>
  463. </EntityTypeMapping>
  464. </EntitySetMapping>
  465. <EntitySetMapping Name="Roles">
  466. <EntityTypeMapping TypeName="PsychoTestsModel.Roles">
  467. <MappingFragment StoreEntitySet="Roles">
  468. <ScalarProperty Name="Role_id" ColumnName="Role_id" />
  469. <ScalarProperty Name="Role_name" ColumnName="Role_name" />
  470. </MappingFragment>
  471. </EntityTypeMapping>
  472. </EntitySetMapping>
  473. <EntitySetMapping Name="Tests">
  474. <EntityTypeMapping TypeName="PsychoTestsModel.Tests">
  475. <MappingFragment StoreEntitySet="Tests">
  476. <ScalarProperty Name="Test_id" ColumnName="Test_id" />
  477. <ScalarProperty Name="Test_name" ColumnName="Test_name" />
  478. <ScalarProperty Name="Questions_count" ColumnName="Questions_count" />
  479. <ScalarProperty Name="Description" ColumnName="Description" />
  480. <ScalarProperty Name="Image" ColumnName="Image" />
  481. <ScalarProperty Name="Id_category" ColumnName="Id_category" />
  482. </MappingFragment>
  483. </EntityTypeMapping>
  484. </EntitySetMapping>
  485. <EntitySetMapping Name="Users">
  486. <EntityTypeMapping TypeName="PsychoTestsModel.Users">
  487. <MappingFragment StoreEntitySet="Users">
  488. <ScalarProperty Name="User_id" ColumnName="User_id" />
  489. <ScalarProperty Name="Login" ColumnName="Login" />
  490. <ScalarProperty Name="Password" ColumnName="Password" />
  491. <ScalarProperty Name="Id_role" ColumnName="Id_role" />
  492. <ScalarProperty Name="Surname" ColumnName="Surname" />
  493. <ScalarProperty Name="Name" ColumnName="Name" />
  494. <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
  495. <ScalarProperty Name="Id_doctor" ColumnName="Id_doctor" />
  496. </MappingFragment>
  497. </EntityTypeMapping>
  498. </EntitySetMapping>
  499. <EntitySetMapping Name="Users_Tests">
  500. <EntityTypeMapping TypeName="PsychoTestsModel.Users_Tests">
  501. <MappingFragment StoreEntitySet="Users_Tests">
  502. <ScalarProperty Name="Id_result" ColumnName="Id_result" />
  503. <ScalarProperty Name="Id" ColumnName="Id" />
  504. <ScalarProperty Name="Id_user" ColumnName="Id_user" />
  505. </MappingFragment>
  506. </EntityTypeMapping>
  507. </EntitySetMapping>
  508. </EntityContainerMapping>
  509. </Mapping>
  510. </edmx:Mappings>
  511. </edmx:Runtime>
  512. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  513. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  514. <Connection>
  515. <DesignerInfoPropertySet>
  516. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  517. </DesignerInfoPropertySet>
  518. </Connection>
  519. <Options>
  520. <DesignerInfoPropertySet>
  521. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  522. <DesignerProperty Name="EnablePluralization" Value="false" />
  523. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  524. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  525. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  526. </DesignerInfoPropertySet>
  527. </Options>
  528. <!-- Diagram content (shape and connector positions) -->
  529. <Diagrams></Diagrams>
  530. </Designer>
  531. </edmx:Edmx>