EDM.edmx 17 KB

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