|
@@ -20,12 +20,20 @@
|
|
|
<Property Name="price" Type="float" />
|
|
|
</EntityType>
|
|
|
<EntityType Name="Order">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="reserved" Type="datetime" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="OrderBooks">
|
|
|
<Key>
|
|
|
<PropertyRef Name="id" />
|
|
|
</Key>
|
|
|
<Property Name="id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
<Property Name="bookId" Type="int" />
|
|
|
<Property Name="count" Type="int" />
|
|
|
+ <Property Name="orderId" Type="int" Nullable="false" />
|
|
|
</EntityType>
|
|
|
<EntityType Name="sysdiagrams">
|
|
|
<Key>
|
|
@@ -37,46 +45,48 @@
|
|
|
<Property Name="version" Type="int" />
|
|
|
<Property Name="definition" Type="varbinary(max)" />
|
|
|
</EntityType>
|
|
|
- <Association Name="FK_Order_Book">
|
|
|
+ <Association Name="FK_OrderBooks_Book">
|
|
|
<End Role="Book" Type="Self.Book" Multiplicity="0..1" />
|
|
|
- <End Role="Order" Type="Self.Order" Multiplicity="*" />
|
|
|
+ <End Role="OrderBooks" Type="Self.OrderBooks" Multiplicity="*" />
|
|
|
<ReferentialConstraint>
|
|
|
<Principal Role="Book">
|
|
|
<PropertyRef Name="id" />
|
|
|
</Principal>
|
|
|
- <Dependent Role="Order">
|
|
|
+ <Dependent Role="OrderBooks">
|
|
|
<PropertyRef Name="bookId" />
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
+ <Association Name="FK_OrderBooks_Order1">
|
|
|
+ <End Role="Order" Type="Self.Order" Multiplicity="1" />
|
|
|
+ <End Role="OrderBooks" Type="Self.OrderBooks" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Order">
|
|
|
+ <PropertyRef Name="id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="OrderBooks">
|
|
|
+ <PropertyRef Name="orderId" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
<EntityContainer Name="Хранилище ModelContainer">
|
|
|
<EntitySet Name="Book" EntityType="Self.Book" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="OrderBooks" EntityType="Self.OrderBooks" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
|
|
|
- <AssociationSet Name="FK_Order_Book" Association="Self.FK_Order_Book">
|
|
|
+ <AssociationSet Name="FK_OrderBooks_Book" Association="Self.FK_OrderBooks_Book">
|
|
|
<End Role="Book" EntitySet="Book" />
|
|
|
+ <End Role="OrderBooks" EntitySet="OrderBooks" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_OrderBooks_Order1" Association="Self.FK_OrderBooks_Order1">
|
|
|
<End Role="Order" EntitySet="Order" />
|
|
|
+ <End Role="OrderBooks" EntitySet="OrderBooks" />
|
|
|
</AssociationSet>
|
|
|
</EntityContainer>
|
|
|
</Schema></edmx:StorageModels>
|
|
|
<!-- CSDL content -->
|
|
|
<edmx:ConceptualModels>
|
|
|
<Schema Namespace="Model" 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">
|
|
|
- <EntityType Name="Book">
|
|
|
- <Key>
|
|
|
- <PropertyRef Name="id" />
|
|
|
- </Key>
|
|
|
- <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
- <Property Name="title" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="cover" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="genre" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="author" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="price" Type="Double" />
|
|
|
- <Property Name="countStrore" Type="Int32" />
|
|
|
- <Property Name="countStock" Type="Int32" />
|
|
|
- <NavigationProperty Name="Orders" Relationship="Model.FK_Order_Book" FromRole="Book" ToRole="Order" />
|
|
|
- </EntityType>
|
|
|
<EntityType Name="sysdiagram">
|
|
|
<Key>
|
|
|
<PropertyRef Name="diagram_id" />
|
|
@@ -88,56 +98,83 @@
|
|
|
<Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
|
|
|
</EntityType>
|
|
|
<EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
|
|
|
- <EntitySet Name="Books" EntityType="Self.Book" />
|
|
|
<EntitySet Name="sysdiagrams" EntityType="Self.sysdiagram" />
|
|
|
+ <EntitySet Name="Books" EntityType="Model.Book" />
|
|
|
<EntitySet Name="Orders" EntityType="Model.Order" />
|
|
|
- <AssociationSet Name="FK_Order_Book" Association="Model.FK_Order_Book">
|
|
|
+ <EntitySet Name="OrderBooks" EntityType="Model.OrderBook" />
|
|
|
+ <AssociationSet Name="FK_OrderBooks_Book" Association="Model.FK_OrderBooks_Book">
|
|
|
<End Role="Book" EntitySet="Books" />
|
|
|
+ <End Role="OrderBook" EntitySet="OrderBooks" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_OrderBooks_Order1" Association="Model.FK_OrderBooks_Order1">
|
|
|
<End Role="Order" EntitySet="Orders" />
|
|
|
+ <End Role="OrderBook" EntitySet="OrderBooks" />
|
|
|
</AssociationSet>
|
|
|
- </EntityContainer>
|
|
|
+ </EntityContainer>
|
|
|
+ <EntityType Name="Book">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="title" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="genre" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="author" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="countStrore" Type="Int32" />
|
|
|
+ <Property Name="countStock" Type="Int32" />
|
|
|
+ <Property Name="description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="cover" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="price" Type="Double" />
|
|
|
+ <NavigationProperty Name="OrderBooks" Relationship="Model.FK_OrderBooks_Book" FromRole="Book" ToRole="OrderBook" />
|
|
|
+ </EntityType>
|
|
|
<EntityType Name="Order">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <NavigationProperty Name="OrderBooks" Relationship="Model.FK_OrderBooks_Order1" FromRole="Order" ToRole="OrderBook" />
|
|
|
+ <Property Name="reserved" Type="DateTime" Precision="3" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="OrderBook">
|
|
|
<Key>
|
|
|
<PropertyRef Name="id" />
|
|
|
</Key>
|
|
|
<Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
<Property Name="bookId" Type="Int32" />
|
|
|
- <NavigationProperty Name="Book" Relationship="Model.FK_Order_Book" FromRole="Order" ToRole="Book" />
|
|
|
<Property Name="count" Type="Int32" />
|
|
|
+ <NavigationProperty Name="Book" Relationship="Model.FK_OrderBooks_Book" FromRole="OrderBook" ToRole="Book" />
|
|
|
+ <Property Name="orderId" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Order1" Relationship="Model.FK_OrderBooks_Order1" FromRole="OrderBook" ToRole="Order" />
|
|
|
</EntityType>
|
|
|
- <Association Name="FK_Order_Book">
|
|
|
+ <Association Name="FK_OrderBooks_Book">
|
|
|
<End Type="Model.Book" Role="Book" Multiplicity="0..1" />
|
|
|
- <End Type="Model.Order" Role="Order" Multiplicity="*" />
|
|
|
+ <End Type="Model.OrderBook" Role="OrderBook" Multiplicity="*" />
|
|
|
<ReferentialConstraint>
|
|
|
<Principal Role="Book">
|
|
|
<PropertyRef Name="id" />
|
|
|
</Principal>
|
|
|
- <Dependent Role="Order">
|
|
|
+ <Dependent Role="OrderBook">
|
|
|
<PropertyRef Name="bookId" />
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
- </Schema>
|
|
|
+ <Association Name="FK_OrderBooks_Order1">
|
|
|
+ <End Type="Model.Order" Role="Order" Multiplicity="1" />
|
|
|
+ <End Type="Model.OrderBook" Role="OrderBook" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Order">
|
|
|
+ <PropertyRef Name="id" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="OrderBook">
|
|
|
+ <PropertyRef Name="orderId" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ </Schema>
|
|
|
</edmx:ConceptualModels>
|
|
|
<!-- C-S mapping content -->
|
|
|
<edmx:Mappings>
|
|
|
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
|
|
|
<EntityContainerMapping StorageEntityContainer="Хранилище ModelContainer" CdmEntityContainer="Entities">
|
|
|
- <EntitySetMapping Name="Books">
|
|
|
- <EntityTypeMapping TypeName="Model.Book">
|
|
|
- <MappingFragment StoreEntitySet="Book">
|
|
|
- <ScalarProperty Name="id" ColumnName="id" />
|
|
|
- <ScalarProperty Name="title" ColumnName="title" />
|
|
|
- <ScalarProperty Name="cover" ColumnName="cover" />
|
|
|
- <ScalarProperty Name="genre" ColumnName="genre" />
|
|
|
- <ScalarProperty Name="author" ColumnName="author" />
|
|
|
- <ScalarProperty Name="description" ColumnName="description" />
|
|
|
- <ScalarProperty Name="price" ColumnName="price" />
|
|
|
- <ScalarProperty Name="countStrore" ColumnName="countStrore" />
|
|
|
- <ScalarProperty Name="countStock" ColumnName="countStock" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
<EntitySetMapping Name="sysdiagrams">
|
|
|
<EntityTypeMapping TypeName="Model.sysdiagram">
|
|
|
<MappingFragment StoreEntitySet="sysdiagrams">
|
|
@@ -149,9 +186,33 @@
|
|
|
</MappingFragment>
|
|
|
</EntityTypeMapping>
|
|
|
</EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Books">
|
|
|
+ <EntityTypeMapping TypeName="Model.Book">
|
|
|
+ <MappingFragment StoreEntitySet="Book">
|
|
|
+ <ScalarProperty Name="price" ColumnName="price" />
|
|
|
+ <ScalarProperty Name="cover" ColumnName="cover" />
|
|
|
+ <ScalarProperty Name="description" ColumnName="description" />
|
|
|
+ <ScalarProperty Name="countStock" ColumnName="countStock" />
|
|
|
+ <ScalarProperty Name="countStrore" ColumnName="countStrore" />
|
|
|
+ <ScalarProperty Name="author" ColumnName="author" />
|
|
|
+ <ScalarProperty Name="genre" ColumnName="genre" />
|
|
|
+ <ScalarProperty Name="title" ColumnName="title" />
|
|
|
+ <ScalarProperty Name="id" ColumnName="id" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
<EntitySetMapping Name="Orders">
|
|
|
<EntityTypeMapping TypeName="Model.Order">
|
|
|
<MappingFragment StoreEntitySet="Order">
|
|
|
+ <ScalarProperty Name="reserved" ColumnName="reserved" />
|
|
|
+ <ScalarProperty Name="id" ColumnName="id" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="OrderBooks">
|
|
|
+ <EntityTypeMapping TypeName="Model.OrderBook">
|
|
|
+ <MappingFragment StoreEntitySet="OrderBooks">
|
|
|
+ <ScalarProperty Name="orderId" ColumnName="orderId" />
|
|
|
<ScalarProperty Name="count" ColumnName="count" />
|
|
|
<ScalarProperty Name="bookId" ColumnName="bookId" />
|
|
|
<ScalarProperty Name="id" ColumnName="id" />
|