EDM.edmx 16 KB

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