EDM.edmx 14 KB

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