EDM.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="Хранилище MyTestsDataBaseModel" 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="IdUserAnswer" />
  11. </Key>
  12. <Property Name="IdUserAnswer" Type="int" Nullable="false" />
  13. <Property Name="IdQuestion" Type="int" Nullable="false" />
  14. <Property Name="IdUser" Type="int" Nullable="false" />
  15. <Property Name="Answer" Type="nvarchar" MaxLength="150" Nullable="false" />
  16. </EntityType>
  17. <EntityType Name="Questions">
  18. <Key>
  19. <PropertyRef Name="IdQuestion" />
  20. </Key>
  21. <Property Name="IdQuestion" Type="int" Nullable="false" />
  22. <Property Name="IdTest" Type="int" Nullable="false" />
  23. <Property Name="Content" Type="nvarchar" MaxLength="150" Nullable="false" />
  24. <Property Name="Answer" Type="nvarchar" MaxLength="150" Nullable="false" />
  25. </EntityType>
  26. <EntityType Name="Tests">
  27. <Key>
  28. <PropertyRef Name="IdTest" />
  29. </Key>
  30. <Property Name="IdTest" Type="int" Nullable="false" />
  31. <Property Name="IdUser" Type="int" Nullable="false" />
  32. <Property Name="Name" Type="nvarchar" MaxLength="150" Nullable="false" />
  33. <Property Name="Image" Type="varbinary(max)" />
  34. <Property Name="IsAnswersVisible" Type="bit" Nullable="false" />
  35. <Property Name="IsVisible" Type="bit" Nullable="false" />
  36. </EntityType>
  37. <EntityType Name="Users">
  38. <Key>
  39. <PropertyRef Name="IdUser" />
  40. </Key>
  41. <Property Name="IdUser" Type="int" Nullable="false" />
  42. <Property Name="Login" Type="nvarchar" MaxLength="50" Nullable="false" />
  43. <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
  44. <Property Name="Email" Type="nvarchar" MaxLength="50" Nullable="false" />
  45. <Property Name="Info" Type="nvarchar" MaxLength="50" />
  46. <Property Name="Image" Type="varbinary(max)" />
  47. <Property Name="Post" Type="nvarchar" MaxLength="25" Nullable="false" />
  48. <Property Name="Surname" Type="nvarchar" MaxLength="50" Nullable="false" />
  49. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  50. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" Nullable="false" />
  51. </EntityType>
  52. <Association Name="FK_Answers_Questions">
  53. <End Role="Questions" Type="Self.Questions" Multiplicity="1" />
  54. <End Role="Answers" Type="Self.Answers" Multiplicity="*" />
  55. <ReferentialConstraint>
  56. <Principal Role="Questions">
  57. <PropertyRef Name="IdQuestion" />
  58. </Principal>
  59. <Dependent Role="Answers">
  60. <PropertyRef Name="IdQuestion" />
  61. </Dependent>
  62. </ReferentialConstraint>
  63. </Association>
  64. <Association Name="FK_Answers_Users">
  65. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  66. <End Role="Answers" Type="Self.Answers" Multiplicity="*" />
  67. <ReferentialConstraint>
  68. <Principal Role="Users">
  69. <PropertyRef Name="IdUser" />
  70. </Principal>
  71. <Dependent Role="Answers">
  72. <PropertyRef Name="IdUser" />
  73. </Dependent>
  74. </ReferentialConstraint>
  75. </Association>
  76. <Association Name="FK_Questions_Tests">
  77. <End Role="Tests" Type="Self.Tests" Multiplicity="1" />
  78. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  79. <ReferentialConstraint>
  80. <Principal Role="Tests">
  81. <PropertyRef Name="IdTest" />
  82. </Principal>
  83. <Dependent Role="Questions">
  84. <PropertyRef Name="IdTest" />
  85. </Dependent>
  86. </ReferentialConstraint>
  87. </Association>
  88. <Association Name="FK_Tests_Users">
  89. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  90. <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
  91. <ReferentialConstraint>
  92. <Principal Role="Users">
  93. <PropertyRef Name="IdUser" />
  94. </Principal>
  95. <Dependent Role="Tests">
  96. <PropertyRef Name="IdUser" />
  97. </Dependent>
  98. </ReferentialConstraint>
  99. </Association>
  100. <EntityContainer Name="Хранилище MyTestsDataBaseModelContainer">
  101. <EntitySet Name="Answers" EntityType="Self.Answers" Schema="dbo" store:Type="Tables" />
  102. <EntitySet Name="Questions" EntityType="Self.Questions" Schema="dbo" store:Type="Tables" />
  103. <EntitySet Name="Tests" EntityType="Self.Tests" Schema="dbo" store:Type="Tables" />
  104. <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
  105. <AssociationSet Name="FK_Answers_Questions" Association="Self.FK_Answers_Questions">
  106. <End Role="Questions" EntitySet="Questions" />
  107. <End Role="Answers" EntitySet="Answers" />
  108. </AssociationSet>
  109. <AssociationSet Name="FK_Answers_Users" Association="Self.FK_Answers_Users">
  110. <End Role="Users" EntitySet="Users" />
  111. <End Role="Answers" EntitySet="Answers" />
  112. </AssociationSet>
  113. <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
  114. <End Role="Tests" EntitySet="Tests" />
  115. <End Role="Questions" EntitySet="Questions" />
  116. </AssociationSet>
  117. <AssociationSet Name="FK_Tests_Users" Association="Self.FK_Tests_Users">
  118. <End Role="Users" EntitySet="Users" />
  119. <End Role="Tests" EntitySet="Tests" />
  120. </AssociationSet>
  121. </EntityContainer>
  122. </Schema></edmx:StorageModels>
  123. <!-- CSDL content -->
  124. <edmx:ConceptualModels>
  125. <Schema Namespace="MyTestsDataBaseModel" 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. <EntityType Name="Answers">
  127. <Key>
  128. <PropertyRef Name="IdUserAnswer" />
  129. </Key>
  130. <Property Name="IdUserAnswer" Type="Int32" Nullable="false" />
  131. <Property Name="IdQuestion" Type="Int32" Nullable="false" />
  132. <Property Name="IdUser" Type="Int32" Nullable="false" />
  133. <Property Name="Answer" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  134. <NavigationProperty Name="Questions" Relationship="Self.FK_Answers_Questions" FromRole="Answers" ToRole="Questions" />
  135. <NavigationProperty Name="Users" Relationship="Self.FK_Answers_Users" FromRole="Answers" ToRole="Users" />
  136. </EntityType>
  137. <EntityType Name="Questions">
  138. <Key>
  139. <PropertyRef Name="IdQuestion" />
  140. </Key>
  141. <Property Name="IdQuestion" Type="Int32" Nullable="false" />
  142. <Property Name="IdTest" Type="Int32" Nullable="false" />
  143. <Property Name="Content" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  144. <Property Name="Answer" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  145. <NavigationProperty Name="Answers" Relationship="Self.FK_Answers_Questions" FromRole="Questions" ToRole="Answers" />
  146. <NavigationProperty Name="Tests" Relationship="Self.FK_Questions_Tests" FromRole="Questions" ToRole="Tests" />
  147. </EntityType>
  148. <EntityType Name="Tests">
  149. <Key>
  150. <PropertyRef Name="IdTest" />
  151. </Key>
  152. <Property Name="IdTest" Type="Int32" Nullable="false" />
  153. <Property Name="IdUser" Type="Int32" Nullable="false" />
  154. <Property Name="Name" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  155. <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
  156. <NavigationProperty Name="Questions" Relationship="Self.FK_Questions_Tests" FromRole="Tests" ToRole="Questions" />
  157. <NavigationProperty Name="Users" Relationship="Self.FK_Tests_Users" FromRole="Tests" ToRole="Users" />
  158. <Property Name="IsAnswersVisible" Type="Boolean" Nullable="false" />
  159. <Property Name="IsVisible" Type="Boolean" Nullable="false" />
  160. </EntityType>
  161. <EntityType Name="Users">
  162. <Key>
  163. <PropertyRef Name="IdUser" />
  164. </Key>
  165. <Property Name="IdUser" Type="Int32" Nullable="false" />
  166. <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  167. <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  168. <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  169. <Property Name="Info" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  170. <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
  171. <NavigationProperty Name="Answers" Relationship="Self.FK_Answers_Users" FromRole="Users" ToRole="Answers" />
  172. <NavigationProperty Name="Tests" Relationship="Self.FK_Tests_Users" FromRole="Users" ToRole="Tests" />
  173. <Property Name="Post" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  174. <Property Name="Surname" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  175. <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  176. <Property Name="Patronymic" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  177. </EntityType>
  178. <Association Name="FK_Answers_Questions">
  179. <End Role="Questions" Type="Self.Questions" Multiplicity="1" />
  180. <End Role="Answers" Type="Self.Answers" Multiplicity="*" />
  181. <ReferentialConstraint>
  182. <Principal Role="Questions">
  183. <PropertyRef Name="IdQuestion" />
  184. </Principal>
  185. <Dependent Role="Answers">
  186. <PropertyRef Name="IdQuestion" />
  187. </Dependent>
  188. </ReferentialConstraint>
  189. </Association>
  190. <Association Name="FK_Answers_Users">
  191. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  192. <End Role="Answers" Type="Self.Answers" Multiplicity="*" />
  193. <ReferentialConstraint>
  194. <Principal Role="Users">
  195. <PropertyRef Name="IdUser" />
  196. </Principal>
  197. <Dependent Role="Answers">
  198. <PropertyRef Name="IdUser" />
  199. </Dependent>
  200. </ReferentialConstraint>
  201. </Association>
  202. <Association Name="FK_Questions_Tests">
  203. <End Role="Tests" Type="Self.Tests" Multiplicity="1" />
  204. <End Role="Questions" Type="Self.Questions" Multiplicity="*" />
  205. <ReferentialConstraint>
  206. <Principal Role="Tests">
  207. <PropertyRef Name="IdTest" />
  208. </Principal>
  209. <Dependent Role="Questions">
  210. <PropertyRef Name="IdTest" />
  211. </Dependent>
  212. </ReferentialConstraint>
  213. </Association>
  214. <Association Name="FK_Tests_Users">
  215. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  216. <End Role="Tests" Type="Self.Tests" Multiplicity="*" />
  217. <ReferentialConstraint>
  218. <Principal Role="Users">
  219. <PropertyRef Name="IdUser" />
  220. </Principal>
  221. <Dependent Role="Tests">
  222. <PropertyRef Name="IdUser" />
  223. </Dependent>
  224. </ReferentialConstraint>
  225. </Association>
  226. <EntityContainer Name="MyTestsDataBaseEntities" annotation:LazyLoadingEnabled="true">
  227. <EntitySet Name="Answers" EntityType="Self.Answers" />
  228. <EntitySet Name="Questions" EntityType="Self.Questions" />
  229. <EntitySet Name="Tests" EntityType="Self.Tests" />
  230. <EntitySet Name="Users" EntityType="Self.Users" />
  231. <AssociationSet Name="FK_Answers_Questions" Association="Self.FK_Answers_Questions">
  232. <End Role="Questions" EntitySet="Questions" />
  233. <End Role="Answers" EntitySet="Answers" />
  234. </AssociationSet>
  235. <AssociationSet Name="FK_Answers_Users" Association="Self.FK_Answers_Users">
  236. <End Role="Users" EntitySet="Users" />
  237. <End Role="Answers" EntitySet="Answers" />
  238. </AssociationSet>
  239. <AssociationSet Name="FK_Questions_Tests" Association="Self.FK_Questions_Tests">
  240. <End Role="Tests" EntitySet="Tests" />
  241. <End Role="Questions" EntitySet="Questions" />
  242. </AssociationSet>
  243. <AssociationSet Name="FK_Tests_Users" Association="Self.FK_Tests_Users">
  244. <End Role="Users" EntitySet="Users" />
  245. <End Role="Tests" EntitySet="Tests" />
  246. </AssociationSet>
  247. </EntityContainer>
  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="Хранилище MyTestsDataBaseModelContainer" CdmEntityContainer="MyTestsDataBaseEntities">
  254. <EntitySetMapping Name="Answers">
  255. <EntityTypeMapping TypeName="MyTestsDataBaseModel.Answers">
  256. <MappingFragment StoreEntitySet="Answers">
  257. <ScalarProperty Name="IdUserAnswer" ColumnName="IdUserAnswer" />
  258. <ScalarProperty Name="IdQuestion" ColumnName="IdQuestion" />
  259. <ScalarProperty Name="IdUser" ColumnName="IdUser" />
  260. <ScalarProperty Name="Answer" ColumnName="Answer" />
  261. </MappingFragment>
  262. </EntityTypeMapping>
  263. </EntitySetMapping>
  264. <EntitySetMapping Name="Questions">
  265. <EntityTypeMapping TypeName="MyTestsDataBaseModel.Questions">
  266. <MappingFragment StoreEntitySet="Questions">
  267. <ScalarProperty Name="IdQuestion" ColumnName="IdQuestion" />
  268. <ScalarProperty Name="IdTest" ColumnName="IdTest" />
  269. <ScalarProperty Name="Content" ColumnName="Content" />
  270. <ScalarProperty Name="Answer" ColumnName="Answer" />
  271. </MappingFragment>
  272. </EntityTypeMapping>
  273. </EntitySetMapping>
  274. <EntitySetMapping Name="Tests">
  275. <EntityTypeMapping TypeName="MyTestsDataBaseModel.Tests">
  276. <MappingFragment StoreEntitySet="Tests">
  277. <ScalarProperty Name="IsVisible" ColumnName="IsVisible" />
  278. <ScalarProperty Name="IsAnswersVisible" ColumnName="IsAnswersVisible" />
  279. <ScalarProperty Name="IdTest" ColumnName="IdTest" />
  280. <ScalarProperty Name="IdUser" ColumnName="IdUser" />
  281. <ScalarProperty Name="Name" ColumnName="Name" />
  282. <ScalarProperty Name="Image" ColumnName="Image" />
  283. </MappingFragment>
  284. </EntityTypeMapping>
  285. </EntitySetMapping>
  286. <EntitySetMapping Name="Users">
  287. <EntityTypeMapping TypeName="MyTestsDataBaseModel.Users">
  288. <MappingFragment StoreEntitySet="Users">
  289. <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
  290. <ScalarProperty Name="Name" ColumnName="Name" />
  291. <ScalarProperty Name="Surname" ColumnName="Surname" />
  292. <ScalarProperty Name="Post" ColumnName="Post" />
  293. <ScalarProperty Name="IdUser" ColumnName="IdUser" />
  294. <ScalarProperty Name="Login" ColumnName="Login" />
  295. <ScalarProperty Name="Password" ColumnName="Password" />
  296. <ScalarProperty Name="Email" ColumnName="Email" />
  297. <ScalarProperty Name="Info" ColumnName="Info" />
  298. <ScalarProperty Name="Image" ColumnName="Image" />
  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>