EDM.edmx 17 KB

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