EDM.edmx 16 KB

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