EDM.edmx 16 KB

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