EDM.edmx 18 KB

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