Model1.edmx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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="Хранилище user31Model" 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="Agent">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  14. <Property Name="AgentTypeID" Type="int" Nullable="false" />
  15. <Property Name="Address" Type="nvarchar" MaxLength="300" />
  16. <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
  17. <Property Name="KPP" Type="varchar" MaxLength="9" />
  18. <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
  19. <Property Name="Phone" Type="nvarchar(max)" Nullable="false" />
  20. <Property Name="Email" Type="nvarchar" MaxLength="255" />
  21. <Property Name="Logo" Type="nvarchar" MaxLength="100" />
  22. <Property Name="Priority" Type="int" Nullable="false" />
  23. </EntityType>
  24. <EntityType Name="AgentType">
  25. <Key>
  26. <PropertyRef Name="ID" />
  27. </Key>
  28. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  29. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  30. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  31. </EntityType>
  32. <EntityType Name="Product">
  33. <Key>
  34. <PropertyRef Name="ID" />
  35. </Key>
  36. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  37. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  38. <Property Name="ProductTypeID" Type="int" />
  39. <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
  40. <Property Name="Description" Type="nvarchar(max)" />
  41. <Property Name="ProductionPersonCount" Type="int" />
  42. <Property Name="ProductionWorkshopNumber" Type="int" />
  43. <Property Name="MinCostForAgent" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  44. </EntityType>
  45. <EntityType Name="ProductSale">
  46. <Key>
  47. <PropertyRef Name="ID" />
  48. </Key>
  49. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  50. <Property Name="AgentID" Type="int" Nullable="false" />
  51. <Property Name="ProductID" Type="int" Nullable="false" />
  52. <Property Name="SaleDate" Type="date" Nullable="false" />
  53. <Property Name="ProductCount" Type="int" Nullable="false" />
  54. </EntityType>
  55. <EntityType Name="ProductType">
  56. <Key>
  57. <PropertyRef Name="ID" />
  58. </Key>
  59. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  60. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  61. </EntityType>
  62. <Association Name="FK_Agent_AgentType">
  63. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  64. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  65. <ReferentialConstraint>
  66. <Principal Role="AgentType">
  67. <PropertyRef Name="ID" />
  68. </Principal>
  69. <Dependent Role="Agent">
  70. <PropertyRef Name="AgentTypeID" />
  71. </Dependent>
  72. </ReferentialConstraint>
  73. </Association>
  74. <Association Name="FK_Product_ProductType">
  75. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  76. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  77. <ReferentialConstraint>
  78. <Principal Role="ProductType">
  79. <PropertyRef Name="ID" />
  80. </Principal>
  81. <Dependent Role="Product">
  82. <PropertyRef Name="ProductTypeID" />
  83. </Dependent>
  84. </ReferentialConstraint>
  85. </Association>
  86. <Association Name="FK_ProductSale_Agent">
  87. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  88. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  89. <ReferentialConstraint>
  90. <Principal Role="Agent">
  91. <PropertyRef Name="ID" />
  92. </Principal>
  93. <Dependent Role="ProductSale">
  94. <PropertyRef Name="AgentID" />
  95. </Dependent>
  96. </ReferentialConstraint>
  97. </Association>
  98. <Association Name="FK_ProductSale_Product">
  99. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  100. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  101. <ReferentialConstraint>
  102. <Principal Role="Product">
  103. <PropertyRef Name="ID" />
  104. </Principal>
  105. <Dependent Role="ProductSale">
  106. <PropertyRef Name="ProductID" />
  107. </Dependent>
  108. </ReferentialConstraint>
  109. </Association>
  110. <EntityContainer Name="Хранилище user31ModelContainer">
  111. <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
  112. <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
  113. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  114. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
  115. <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
  116. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  117. <End Role="AgentType" EntitySet="AgentType" />
  118. <End Role="Agent" EntitySet="Agent" />
  119. </AssociationSet>
  120. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  121. <End Role="ProductType" EntitySet="ProductType" />
  122. <End Role="Product" EntitySet="Product" />
  123. </AssociationSet>
  124. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  125. <End Role="Agent" EntitySet="Agent" />
  126. <End Role="ProductSale" EntitySet="ProductSale" />
  127. </AssociationSet>
  128. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  129. <End Role="Product" EntitySet="Product" />
  130. <End Role="ProductSale" EntitySet="ProductSale" />
  131. </AssociationSet>
  132. </EntityContainer>
  133. </Schema>
  134. </edmx:StorageModels>
  135. <!-- CSDL content -->
  136. <edmx:ConceptualModels>
  137. <Schema Namespace="user31Model" 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">
  138. <EntityType Name="Agent">
  139. <Key>
  140. <PropertyRef Name="ID" />
  141. </Key>
  142. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  143. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  144. <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
  145. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  146. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  147. <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
  148. <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  149. <Property Name="Phone" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  150. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  151. <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  152. <Property Name="Priority" Type="Int32" Nullable="false" />
  153. <NavigationProperty Name="AgentType" Relationship="Self.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
  154. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
  155. </EntityType>
  156. <EntityType Name="AgentType">
  157. <Key>
  158. <PropertyRef Name="ID" />
  159. </Key>
  160. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  161. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  162. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  163. <NavigationProperty Name="Agent" Relationship="Self.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
  164. </EntityType>
  165. <EntityType Name="Product">
  166. <Key>
  167. <PropertyRef Name="ID" />
  168. </Key>
  169. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  170. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  171. <Property Name="ProductTypeID" Type="Int32" />
  172. <Property Name="ArticleNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  173. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  174. <Property Name="ProductionPersonCount" Type="Int32" />
  175. <Property Name="ProductionWorkshopNumber" Type="Int32" />
  176. <Property Name="MinCostForAgent" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  177. <NavigationProperty Name="ProductType" Relationship="Self.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
  178. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  179. </EntityType>
  180. <EntityType Name="ProductSale">
  181. <Key>
  182. <PropertyRef Name="ID" />
  183. </Key>
  184. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  185. <Property Name="AgentID" Type="Int32" Nullable="false" />
  186. <Property Name="ProductID" Type="Int32" Nullable="false" />
  187. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
  188. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  189. <NavigationProperty Name="Agent" Relationship="Self.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
  190. <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  191. </EntityType>
  192. <EntityType Name="ProductType">
  193. <Key>
  194. <PropertyRef Name="ID" />
  195. </Key>
  196. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  197. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  198. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
  199. </EntityType>
  200. <Association Name="FK_Agent_AgentType">
  201. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  202. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  203. <ReferentialConstraint>
  204. <Principal Role="AgentType">
  205. <PropertyRef Name="ID" />
  206. </Principal>
  207. <Dependent Role="Agent">
  208. <PropertyRef Name="AgentTypeID" />
  209. </Dependent>
  210. </ReferentialConstraint>
  211. </Association>
  212. <Association Name="FK_ProductSale_Agent">
  213. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  214. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  215. <ReferentialConstraint>
  216. <Principal Role="Agent">
  217. <PropertyRef Name="ID" />
  218. </Principal>
  219. <Dependent Role="ProductSale">
  220. <PropertyRef Name="AgentID" />
  221. </Dependent>
  222. </ReferentialConstraint>
  223. </Association>
  224. <Association Name="FK_Product_ProductType">
  225. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  226. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  227. <ReferentialConstraint>
  228. <Principal Role="ProductType">
  229. <PropertyRef Name="ID" />
  230. </Principal>
  231. <Dependent Role="Product">
  232. <PropertyRef Name="ProductTypeID" />
  233. </Dependent>
  234. </ReferentialConstraint>
  235. </Association>
  236. <Association Name="FK_ProductSale_Product">
  237. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  238. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  239. <ReferentialConstraint>
  240. <Principal Role="Product">
  241. <PropertyRef Name="ID" />
  242. </Principal>
  243. <Dependent Role="ProductSale">
  244. <PropertyRef Name="ProductID" />
  245. </Dependent>
  246. </ReferentialConstraint>
  247. </Association>
  248. <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
  249. <EntitySet Name="Agent" EntityType="Self.Agent" />
  250. <EntitySet Name="AgentType" EntityType="Self.AgentType" />
  251. <EntitySet Name="Product" EntityType="Self.Product" />
  252. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  253. <EntitySet Name="ProductType" EntityType="Self.ProductType" />
  254. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  255. <End Role="AgentType" EntitySet="AgentType" />
  256. <End Role="Agent" EntitySet="Agent" />
  257. </AssociationSet>
  258. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  259. <End Role="Agent" EntitySet="Agent" />
  260. <End Role="ProductSale" EntitySet="ProductSale" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  263. <End Role="ProductType" EntitySet="ProductType" />
  264. <End Role="Product" EntitySet="Product" />
  265. </AssociationSet>
  266. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  267. <End Role="Product" EntitySet="Product" />
  268. <End Role="ProductSale" EntitySet="ProductSale" />
  269. </AssociationSet>
  270. </EntityContainer>
  271. </Schema>
  272. </edmx:ConceptualModels>
  273. <!-- C-S mapping content -->
  274. <edmx:Mappings>
  275. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  276. <EntityContainerMapping StorageEntityContainer="Хранилище user31ModelContainer" CdmEntityContainer="Entities">
  277. <EntitySetMapping Name="Agent">
  278. <EntityTypeMapping TypeName="user31Model.Agent">
  279. <MappingFragment StoreEntitySet="Agent">
  280. <ScalarProperty Name="ID" ColumnName="ID" />
  281. <ScalarProperty Name="Title" ColumnName="Title" />
  282. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  283. <ScalarProperty Name="Address" ColumnName="Address" />
  284. <ScalarProperty Name="INN" ColumnName="INN" />
  285. <ScalarProperty Name="KPP" ColumnName="KPP" />
  286. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  287. <ScalarProperty Name="Phone" ColumnName="Phone" />
  288. <ScalarProperty Name="Email" ColumnName="Email" />
  289. <ScalarProperty Name="Logo" ColumnName="Logo" />
  290. <ScalarProperty Name="Priority" ColumnName="Priority" />
  291. </MappingFragment>
  292. </EntityTypeMapping>
  293. </EntitySetMapping>
  294. <EntitySetMapping Name="AgentType">
  295. <EntityTypeMapping TypeName="user31Model.AgentType">
  296. <MappingFragment StoreEntitySet="AgentType">
  297. <ScalarProperty Name="ID" ColumnName="ID" />
  298. <ScalarProperty Name="Title" ColumnName="Title" />
  299. <ScalarProperty Name="Image" ColumnName="Image" />
  300. </MappingFragment>
  301. </EntityTypeMapping>
  302. </EntitySetMapping>
  303. <EntitySetMapping Name="Product">
  304. <EntityTypeMapping TypeName="user31Model.Product">
  305. <MappingFragment StoreEntitySet="Product">
  306. <ScalarProperty Name="ID" ColumnName="ID" />
  307. <ScalarProperty Name="Title" ColumnName="Title" />
  308. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  309. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  310. <ScalarProperty Name="Description" ColumnName="Description" />
  311. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  312. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  313. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  314. </MappingFragment>
  315. </EntityTypeMapping>
  316. </EntitySetMapping>
  317. <EntitySetMapping Name="ProductSale">
  318. <EntityTypeMapping TypeName="user31Model.ProductSale">
  319. <MappingFragment StoreEntitySet="ProductSale">
  320. <ScalarProperty Name="ID" ColumnName="ID" />
  321. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  322. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  323. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  324. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  325. </MappingFragment>
  326. </EntityTypeMapping>
  327. </EntitySetMapping>
  328. <EntitySetMapping Name="ProductType">
  329. <EntityTypeMapping TypeName="user31Model.ProductType">
  330. <MappingFragment StoreEntitySet="ProductType">
  331. <ScalarProperty Name="ID" ColumnName="ID" />
  332. <ScalarProperty Name="Title" ColumnName="Title" />
  333. </MappingFragment>
  334. </EntityTypeMapping>
  335. </EntitySetMapping>
  336. </EntityContainerMapping>
  337. </Mapping>
  338. </edmx:Mappings>
  339. </edmx:Runtime>
  340. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  341. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  342. <Connection>
  343. <DesignerInfoPropertySet>
  344. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  345. </DesignerInfoPropertySet>
  346. </Connection>
  347. <Options>
  348. <DesignerInfoPropertySet>
  349. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  350. <DesignerProperty Name="EnablePluralization" Value="false" />
  351. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  352. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  353. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  354. </DesignerInfoPropertySet>
  355. </Options>
  356. <!-- Diagram content (shape and connector positions) -->
  357. <Diagrams></Diagrams>
  358. </Designer>
  359. </edmx:Edmx>