|
@@ -5,27 +5,47 @@
|
|
|
<!-- SSDL content -->
|
|
|
<edmx:StorageModels>
|
|
|
<Schema Namespace="RouteScheduleDataBaseModel.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">
|
|
|
+ <EntityType Name="Carriages">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="IdCarriage" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="IdCarriage" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Count" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
<EntityType Name="Routes">
|
|
|
<Key>
|
|
|
<PropertyRef Name="IdRoute" />
|
|
|
</Key>
|
|
|
<Property Name="IdRoute" Type="int" Nullable="false" />
|
|
|
<Property Name="IdTrain" Type="int" Nullable="false" />
|
|
|
- <Property Name="Departure_Station" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
- <Property Name="Arrival_Station" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
<Property Name="Departure_Date" Type="datetime" Nullable="false" />
|
|
|
<Property Name="Arrival_Date" Type="datetime" Nullable="false" />
|
|
|
</EntityType>
|
|
|
- <EntityType Name="TestTable">
|
|
|
+ <EntityType Name="RoutesStations">
|
|
|
<Key>
|
|
|
- <PropertyRef Name="IdRoute" />
|
|
|
+ <PropertyRef Name="IdRouteStation" />
|
|
|
</Key>
|
|
|
+ <Property Name="IdRouteStation" Type="int" Nullable="false" />
|
|
|
<Property Name="IdRoute" Type="int" Nullable="false" />
|
|
|
- <Property Name="IdTrain" Type="int" Nullable="false" />
|
|
|
- <Property Name="Departure" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
- <Property Name="Arrival" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
- <Property Name="DepartureDate" Type="datetime" Nullable="false" />
|
|
|
- <Property Name="ArrivalDate" Type="datetime" Nullable="false" />
|
|
|
+ <Property Name="IdStation" Type="int" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Station">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="IdStation" Type="int" Nullable="false" />
|
|
|
+ <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
+ <Property Name="Location" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="sysdiagrams">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="diagram_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
|
|
|
+ <Property Name="principal_id" Type="int" Nullable="false" />
|
|
|
+ <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
|
|
+ <Property Name="version" Type="int" />
|
|
|
+ <Property Name="definition" Type="varbinary(max)" />
|
|
|
</EntityType>
|
|
|
<EntityType Name="Tickets">
|
|
|
<Key>
|
|
@@ -34,7 +54,7 @@
|
|
|
<Property Name="IdTicket" Type="int" Nullable="false" />
|
|
|
<Property Name="IdUser" Type="int" Nullable="false" />
|
|
|
<Property Name="IdRoute" Type="int" Nullable="false" />
|
|
|
- <Property Name="IdTrainCarriage" Type="int" Nullable="false" />
|
|
|
+ <Property Name="IdCarriage" Type="int" Nullable="false" />
|
|
|
<Property Name="PlaceNumber" Type="int" Nullable="false" />
|
|
|
<Property Name="Category" Type="int" Nullable="false" />
|
|
|
<Property Name="BuyDate" Type="datetime" Nullable="false" />
|
|
@@ -46,13 +66,6 @@
|
|
|
<Property Name="IdTrain" Type="int" Nullable="false" />
|
|
|
<Property Name="NameOfTrain" Type="nvarchar" MaxLength="50" Nullable="false" />
|
|
|
</EntityType>
|
|
|
- <EntityType Name="TrainsCarriages">
|
|
|
- <Key>
|
|
|
- <PropertyRef Name="IdCarriage" />
|
|
|
- </Key>
|
|
|
- <Property Name="IdCarriage" Type="int" Nullable="false" />
|
|
|
- <Property Name="Count" Type="int" Nullable="false" />
|
|
|
- </EntityType>
|
|
|
<EntityType Name="Users">
|
|
|
<Key>
|
|
|
<PropertyRef Name="IdUser" />
|
|
@@ -77,27 +90,51 @@
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
- <Association Name="FK_Tickets_Routes">
|
|
|
+ <Association Name="FK_RoutesStations_Routes">
|
|
|
<End Role="Routes" Type="Self.Routes" Multiplicity="1" />
|
|
|
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
|
|
|
+ <End Role="RoutesStations" Type="Self.RoutesStations" Multiplicity="*" />
|
|
|
<ReferentialConstraint>
|
|
|
<Principal Role="Routes">
|
|
|
<PropertyRef Name="IdRoute" />
|
|
|
</Principal>
|
|
|
- <Dependent Role="Tickets">
|
|
|
+ <Dependent Role="RoutesStations">
|
|
|
<PropertyRef Name="IdRoute" />
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
- <Association Name="FK_Tickets_TrainsCarriages">
|
|
|
- <End Role="TrainsCarriages" Type="Self.TrainsCarriages" Multiplicity="1" />
|
|
|
+ <Association Name="FK_RoutesStations_Station">
|
|
|
+ <End Role="Station" Type="Self.Station" Multiplicity="1" />
|
|
|
+ <End Role="RoutesStations" Type="Self.RoutesStations" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Station">
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="RoutesStations">
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Tickets_Carriages">
|
|
|
+ <End Role="Carriages" Type="Self.Carriages" Multiplicity="1" />
|
|
|
<End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
|
|
|
<ReferentialConstraint>
|
|
|
- <Principal Role="TrainsCarriages">
|
|
|
+ <Principal Role="Carriages">
|
|
|
<PropertyRef Name="IdCarriage" />
|
|
|
</Principal>
|
|
|
<Dependent Role="Tickets">
|
|
|
- <PropertyRef Name="IdTrainCarriage" />
|
|
|
+ <PropertyRef Name="IdCarriage" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
+ <Association Name="FK_Tickets_Routes">
|
|
|
+ <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
|
|
|
+ <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Routes">
|
|
|
+ <PropertyRef Name="IdRoute" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Tickets">
|
|
|
+ <PropertyRef Name="IdRoute" />
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
@@ -114,22 +151,32 @@
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
<EntityContainer Name="RouteScheduleDataBaseModelStoreContainer">
|
|
|
+ <EntitySet Name="Carriages" EntityType="Self.Carriages" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="Routes" EntityType="Self.Routes" Schema="dbo" store:Type="Tables" />
|
|
|
- <EntitySet Name="TestTable" EntityType="Self.TestTable" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="RoutesStations" EntityType="Self.RoutesStations" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="Station" EntityType="Self.Station" Schema="dbo" store:Type="Tables" />
|
|
|
+ <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="Tickets" EntityType="Self.Tickets" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="Trains" EntityType="Self.Trains" Schema="dbo" store:Type="Tables" />
|
|
|
- <EntitySet Name="TrainsCarriages" EntityType="Self.TrainsCarriages" Schema="dbo" store:Type="Tables" />
|
|
|
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
|
|
<AssociationSet Name="FK_Routes_Trains" Association="Self.FK_Routes_Trains">
|
|
|
<End Role="Trains" EntitySet="Trains" />
|
|
|
<End Role="Routes" EntitySet="Routes" />
|
|
|
</AssociationSet>
|
|
|
- <AssociationSet Name="FK_Tickets_Routes" Association="Self.FK_Tickets_Routes">
|
|
|
+ <AssociationSet Name="FK_RoutesStations_Routes" Association="Self.FK_RoutesStations_Routes">
|
|
|
<End Role="Routes" EntitySet="Routes" />
|
|
|
+ <End Role="RoutesStations" EntitySet="RoutesStations" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_RoutesStations_Station" Association="Self.FK_RoutesStations_Station">
|
|
|
+ <End Role="Station" EntitySet="Station" />
|
|
|
+ <End Role="RoutesStations" EntitySet="RoutesStations" />
|
|
|
+ </AssociationSet>
|
|
|
+ <AssociationSet Name="FK_Tickets_Carriages" Association="Self.FK_Tickets_Carriages">
|
|
|
+ <End Role="Carriages" EntitySet="Carriages" />
|
|
|
<End Role="Tickets" EntitySet="Tickets" />
|
|
|
</AssociationSet>
|
|
|
- <AssociationSet Name="FK_Tickets_TrainsCarriages" Association="Self.FK_Tickets_TrainsCarriages">
|
|
|
- <End Role="TrainsCarriages" EntitySet="TrainsCarriages" />
|
|
|
+ <AssociationSet Name="FK_Tickets_Routes" Association="Self.FK_Tickets_Routes">
|
|
|
+ <End Role="Routes" EntitySet="Routes" />
|
|
|
<End Role="Tickets" EntitySet="Tickets" />
|
|
|
</AssociationSet>
|
|
|
<AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
|
|
@@ -142,52 +189,87 @@
|
|
|
<edmx:ConceptualModels>
|
|
|
<Schema Namespace="RouteScheduleDataBaseModel" 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">
|
|
|
<EntityContainer Name="RouteScheduleDataBaseEntities" annotation:LazyLoadingEnabled="true">
|
|
|
+ <EntitySet Name="Carriages" EntityType="RouteScheduleDataBaseModel.Carriages" />
|
|
|
<EntitySet Name="Routes" EntityType="RouteScheduleDataBaseModel.Routes" />
|
|
|
- <EntitySet Name="TestTable" EntityType="RouteScheduleDataBaseModel.TestTable" />
|
|
|
+ <EntitySet Name="RoutesStations" EntityType="RouteScheduleDataBaseModel.RoutesStations" />
|
|
|
+ <EntitySet Name="Station" EntityType="RouteScheduleDataBaseModel.Station" />
|
|
|
+ <EntitySet Name="sysdiagrams" EntityType="RouteScheduleDataBaseModel.sysdiagrams" />
|
|
|
<EntitySet Name="Tickets" EntityType="RouteScheduleDataBaseModel.Tickets" />
|
|
|
<EntitySet Name="Trains" EntityType="RouteScheduleDataBaseModel.Trains" />
|
|
|
- <EntitySet Name="TrainsCarriages" EntityType="RouteScheduleDataBaseModel.TrainsCarriages" />
|
|
|
<EntitySet Name="Users" EntityType="RouteScheduleDataBaseModel.Users" />
|
|
|
+ <AssociationSet Name="FK_Tickets_Carriages" Association="RouteScheduleDataBaseModel.FK_Tickets_Carriages">
|
|
|
+ <End Role="Carriages" EntitySet="Carriages" />
|
|
|
+ <End Role="Tickets" EntitySet="Tickets" />
|
|
|
+ </AssociationSet>
|
|
|
<AssociationSet Name="FK_Routes_Trains" Association="RouteScheduleDataBaseModel.FK_Routes_Trains">
|
|
|
<End Role="Trains" EntitySet="Trains" />
|
|
|
<End Role="Routes" EntitySet="Routes" />
|
|
|
</AssociationSet>
|
|
|
+ <AssociationSet Name="FK_RoutesStations_Routes" Association="RouteScheduleDataBaseModel.FK_RoutesStations_Routes">
|
|
|
+ <End Role="Routes" EntitySet="Routes" />
|
|
|
+ <End Role="RoutesStations" EntitySet="RoutesStations" />
|
|
|
+ </AssociationSet>
|
|
|
<AssociationSet Name="FK_Tickets_Routes" Association="RouteScheduleDataBaseModel.FK_Tickets_Routes">
|
|
|
<End Role="Routes" EntitySet="Routes" />
|
|
|
<End Role="Tickets" EntitySet="Tickets" />
|
|
|
</AssociationSet>
|
|
|
- <AssociationSet Name="FK_Tickets_TrainsCarriages" Association="RouteScheduleDataBaseModel.FK_Tickets_TrainsCarriages">
|
|
|
- <End Role="TrainsCarriages" EntitySet="TrainsCarriages" />
|
|
|
- <End Role="Tickets" EntitySet="Tickets" />
|
|
|
+ <AssociationSet Name="FK_RoutesStations_Station" Association="RouteScheduleDataBaseModel.FK_RoutesStations_Station">
|
|
|
+ <End Role="Station" EntitySet="Station" />
|
|
|
+ <End Role="RoutesStations" EntitySet="RoutesStations" />
|
|
|
</AssociationSet>
|
|
|
<AssociationSet Name="FK_Tickets_Users" Association="RouteScheduleDataBaseModel.FK_Tickets_Users">
|
|
|
<End Role="Users" EntitySet="Users" />
|
|
|
<End Role="Tickets" EntitySet="Tickets" />
|
|
|
</AssociationSet>
|
|
|
</EntityContainer>
|
|
|
+ <EntityType Name="Carriages">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="IdCarriage" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="IdCarriage" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Count" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Carriages" ToRole="Tickets" />
|
|
|
+ </EntityType>
|
|
|
<EntityType Name="Routes">
|
|
|
<Key>
|
|
|
<PropertyRef Name="IdRoute" />
|
|
|
</Key>
|
|
|
<Property Name="IdRoute" Type="Int32" Nullable="false" />
|
|
|
<Property Name="IdTrain" Type="Int32" Nullable="false" />
|
|
|
- <Property Name="Departure_Station" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="Arrival_Station" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
<Property Name="Departure_Date" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
<Property Name="Arrival_Date" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
<NavigationProperty Name="Trains" Relationship="RouteScheduleDataBaseModel.FK_Routes_Trains" FromRole="Routes" ToRole="Trains" />
|
|
|
+ <NavigationProperty Name="RoutesStations" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Routes" FromRole="Routes" ToRole="RoutesStations" />
|
|
|
<NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Routes" FromRole="Routes" ToRole="Tickets" />
|
|
|
</EntityType>
|
|
|
- <EntityType Name="TestTable">
|
|
|
+ <EntityType Name="RoutesStations">
|
|
|
<Key>
|
|
|
- <PropertyRef Name="IdRoute" />
|
|
|
+ <PropertyRef Name="IdRouteStation" />
|
|
|
</Key>
|
|
|
+ <Property Name="IdRouteStation" Type="Int32" Nullable="false" />
|
|
|
<Property Name="IdRoute" Type="Int32" Nullable="false" />
|
|
|
- <Property Name="IdTrain" Type="Int32" Nullable="false" />
|
|
|
- <Property Name="Departure" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="Arrival" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
- <Property Name="DepartureDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
- <Property Name="ArrivalDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
+ <Property Name="IdStation" Type="Int32" Nullable="false" />
|
|
|
+ <NavigationProperty Name="Routes" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Routes" FromRole="RoutesStations" ToRole="Routes" />
|
|
|
+ <NavigationProperty Name="Station" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Station" FromRole="RoutesStations" ToRole="Station" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="Station">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="IdStation" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="Location" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
+ <NavigationProperty Name="RoutesStations" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Station" FromRole="Station" ToRole="RoutesStations" />
|
|
|
+ </EntityType>
|
|
|
+ <EntityType Name="sysdiagrams">
|
|
|
+ <Key>
|
|
|
+ <PropertyRef Name="diagram_id" />
|
|
|
+ </Key>
|
|
|
+ <Property Name="name" Type="String" Nullable="false" MaxLength="128" FixedLength="false" Unicode="true" />
|
|
|
+ <Property Name="principal_id" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
|
|
+ <Property Name="version" Type="Int32" />
|
|
|
+ <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
|
|
|
</EntityType>
|
|
|
<EntityType Name="Tickets">
|
|
|
<Key>
|
|
@@ -196,12 +278,12 @@
|
|
|
<Property Name="IdTicket" Type="Int32" Nullable="false" />
|
|
|
<Property Name="IdUser" Type="Int32" Nullable="false" />
|
|
|
<Property Name="IdRoute" Type="Int32" Nullable="false" />
|
|
|
- <Property Name="IdTrainCarriage" Type="Int32" Nullable="false" />
|
|
|
+ <Property Name="IdCarriage" Type="Int32" Nullable="false" />
|
|
|
<Property Name="PlaceNumber" Type="Int32" Nullable="false" />
|
|
|
<Property Name="Category" Type="Int32" Nullable="false" />
|
|
|
<Property Name="BuyDate" Type="DateTime" Nullable="false" Precision="3" />
|
|
|
+ <NavigationProperty Name="Carriages" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Tickets" ToRole="Carriages" />
|
|
|
<NavigationProperty Name="Routes" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Routes" FromRole="Tickets" ToRole="Routes" />
|
|
|
- <NavigationProperty Name="TrainsCarriages" Relationship="RouteScheduleDataBaseModel.FK_Tickets_TrainsCarriages" FromRole="Tickets" ToRole="TrainsCarriages" />
|
|
|
<NavigationProperty Name="Users" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Users" FromRole="Tickets" ToRole="Users" />
|
|
|
</EntityType>
|
|
|
<EntityType Name="Trains">
|
|
@@ -212,14 +294,6 @@
|
|
|
<Property Name="NameOfTrain" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
<NavigationProperty Name="Routes" Relationship="RouteScheduleDataBaseModel.FK_Routes_Trains" FromRole="Trains" ToRole="Routes" />
|
|
|
</EntityType>
|
|
|
- <EntityType Name="TrainsCarriages">
|
|
|
- <Key>
|
|
|
- <PropertyRef Name="IdCarriage" />
|
|
|
- </Key>
|
|
|
- <Property Name="IdCarriage" Type="Int32" Nullable="false" />
|
|
|
- <Property Name="Count" Type="Int32" Nullable="false" />
|
|
|
- <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_TrainsCarriages" FromRole="TrainsCarriages" ToRole="Tickets" />
|
|
|
- </EntityType>
|
|
|
<EntityType Name="Users">
|
|
|
<Key>
|
|
|
<PropertyRef Name="IdUser" />
|
|
@@ -233,6 +307,18 @@
|
|
|
<Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
|
|
<NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
|
|
|
</EntityType>
|
|
|
+ <Association Name="FK_Tickets_Carriages">
|
|
|
+ <End Type="RouteScheduleDataBaseModel.Carriages" Role="Carriages" Multiplicity="1" />
|
|
|
+ <End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Carriages">
|
|
|
+ <PropertyRef Name="IdCarriage" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="Tickets">
|
|
|
+ <PropertyRef Name="IdCarriage" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
<Association Name="FK_Routes_Trains">
|
|
|
<End Type="RouteScheduleDataBaseModel.Trains" Role="Trains" Multiplicity="1" />
|
|
|
<End Type="RouteScheduleDataBaseModel.Routes" Role="Routes" Multiplicity="*" />
|
|
@@ -245,6 +331,18 @@
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
+ <Association Name="FK_RoutesStations_Routes">
|
|
|
+ <End Type="RouteScheduleDataBaseModel.Routes" Role="Routes" Multiplicity="1" />
|
|
|
+ <End Type="RouteScheduleDataBaseModel.RoutesStations" Role="RoutesStations" Multiplicity="*" />
|
|
|
+ <ReferentialConstraint>
|
|
|
+ <Principal Role="Routes">
|
|
|
+ <PropertyRef Name="IdRoute" />
|
|
|
+ </Principal>
|
|
|
+ <Dependent Role="RoutesStations">
|
|
|
+ <PropertyRef Name="IdRoute" />
|
|
|
+ </Dependent>
|
|
|
+ </ReferentialConstraint>
|
|
|
+ </Association>
|
|
|
<Association Name="FK_Tickets_Routes">
|
|
|
<End Type="RouteScheduleDataBaseModel.Routes" Role="Routes" Multiplicity="1" />
|
|
|
<End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
|
|
@@ -257,15 +355,15 @@
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
- <Association Name="FK_Tickets_TrainsCarriages">
|
|
|
- <End Type="RouteScheduleDataBaseModel.TrainsCarriages" Role="TrainsCarriages" Multiplicity="1" />
|
|
|
- <End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
|
|
|
+ <Association Name="FK_RoutesStations_Station">
|
|
|
+ <End Type="RouteScheduleDataBaseModel.Station" Role="Station" Multiplicity="1" />
|
|
|
+ <End Type="RouteScheduleDataBaseModel.RoutesStations" Role="RoutesStations" Multiplicity="*" />
|
|
|
<ReferentialConstraint>
|
|
|
- <Principal Role="TrainsCarriages">
|
|
|
- <PropertyRef Name="IdCarriage" />
|
|
|
+ <Principal Role="Station">
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
</Principal>
|
|
|
- <Dependent Role="Tickets">
|
|
|
- <PropertyRef Name="IdTrainCarriage" />
|
|
|
+ <Dependent Role="RoutesStations">
|
|
|
+ <PropertyRef Name="IdStation" />
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
@@ -281,79 +379,94 @@
|
|
|
</Dependent>
|
|
|
</ReferentialConstraint>
|
|
|
</Association>
|
|
|
- </Schema>
|
|
|
+ </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="RouteScheduleDataBaseModelStoreContainer" CdmEntityContainer="RouteScheduleDataBaseEntities">
|
|
|
- <EntitySetMapping Name="Routes">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.Routes)">
|
|
|
- <MappingFragment StoreEntitySet="Routes">
|
|
|
- <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
- <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
|
|
|
- <ScalarProperty Name="Departure_Station" ColumnName="Departure_Station" />
|
|
|
- <ScalarProperty Name="Arrival_Station" ColumnName="Arrival_Station" />
|
|
|
- <ScalarProperty Name="Departure_Date" ColumnName="Departure_Date" />
|
|
|
- <ScalarProperty Name="Arrival_Date" ColumnName="Arrival_Date" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- <EntitySetMapping Name="TestTable">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.TestTable)">
|
|
|
- <MappingFragment StoreEntitySet="TestTable">
|
|
|
- <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
- <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
|
|
|
- <ScalarProperty Name="Departure" ColumnName="Departure" />
|
|
|
- <ScalarProperty Name="Arrival" ColumnName="Arrival" />
|
|
|
- <ScalarProperty Name="DepartureDate" ColumnName="DepartureDate" />
|
|
|
- <ScalarProperty Name="ArrivalDate" ColumnName="ArrivalDate" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- <EntitySetMapping Name="Tickets">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.Tickets)">
|
|
|
- <MappingFragment StoreEntitySet="Tickets">
|
|
|
- <ScalarProperty Name="IdTicket" ColumnName="IdTicket" />
|
|
|
- <ScalarProperty Name="IdUser" ColumnName="IdUser" />
|
|
|
- <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
- <ScalarProperty Name="IdTrainCarriage" ColumnName="IdTrainCarriage" />
|
|
|
- <ScalarProperty Name="PlaceNumber" ColumnName="PlaceNumber" />
|
|
|
- <ScalarProperty Name="Category" ColumnName="Category" />
|
|
|
- <ScalarProperty Name="BuyDate" ColumnName="BuyDate" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- <EntitySetMapping Name="Trains">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.Trains)">
|
|
|
- <MappingFragment StoreEntitySet="Trains">
|
|
|
- <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
|
|
|
- <ScalarProperty Name="NameOfTrain" ColumnName="NameOfTrain" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- <EntitySetMapping Name="TrainsCarriages">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.TrainsCarriages)">
|
|
|
- <MappingFragment StoreEntitySet="TrainsCarriages">
|
|
|
- <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
|
|
|
- <ScalarProperty Name="Count" ColumnName="Count" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- <EntitySetMapping Name="Users">
|
|
|
- <EntityTypeMapping TypeName="IsTypeOf(RouteScheduleDataBaseModel.Users)">
|
|
|
- <MappingFragment StoreEntitySet="Users">
|
|
|
- <ScalarProperty Name="IdUser" ColumnName="IdUser" />
|
|
|
- <ScalarProperty Name="Login" ColumnName="Login" />
|
|
|
- <ScalarProperty Name="Password" ColumnName="Password" />
|
|
|
- <ScalarProperty Name="Passport" ColumnName="Passport" />
|
|
|
- <ScalarProperty Name="Surname" ColumnName="Surname" />
|
|
|
- <ScalarProperty Name="Name" ColumnName="Name" />
|
|
|
- <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
|
|
|
- </MappingFragment>
|
|
|
- </EntityTypeMapping>
|
|
|
- </EntitySetMapping>
|
|
|
- </EntityContainerMapping>
|
|
|
+ <EntitySetMapping Name="Carriages">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Carriages">
|
|
|
+ <MappingFragment StoreEntitySet="Carriages">
|
|
|
+ <ScalarProperty Name="Count" ColumnName="Count" />
|
|
|
+ <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Routes">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Routes">
|
|
|
+ <MappingFragment StoreEntitySet="Routes">
|
|
|
+ <ScalarProperty Name="Arrival_Date" ColumnName="Arrival_Date" />
|
|
|
+ <ScalarProperty Name="Departure_Date" ColumnName="Departure_Date" />
|
|
|
+ <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
|
|
|
+ <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="RoutesStations">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.RoutesStations">
|
|
|
+ <MappingFragment StoreEntitySet="RoutesStations">
|
|
|
+ <ScalarProperty Name="IdStation" ColumnName="IdStation" />
|
|
|
+ <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
+ <ScalarProperty Name="IdRouteStation" ColumnName="IdRouteStation" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Station">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Station">
|
|
|
+ <MappingFragment StoreEntitySet="Station">
|
|
|
+ <ScalarProperty Name="Location" ColumnName="Location" />
|
|
|
+ <ScalarProperty Name="Name" ColumnName="Name" />
|
|
|
+ <ScalarProperty Name="IdStation" ColumnName="IdStation" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="sysdiagrams">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.sysdiagrams">
|
|
|
+ <MappingFragment StoreEntitySet="sysdiagrams">
|
|
|
+ <ScalarProperty Name="definition" ColumnName="definition" />
|
|
|
+ <ScalarProperty Name="version" ColumnName="version" />
|
|
|
+ <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
|
|
|
+ <ScalarProperty Name="principal_id" ColumnName="principal_id" />
|
|
|
+ <ScalarProperty Name="name" ColumnName="name" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Tickets">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Tickets">
|
|
|
+ <MappingFragment StoreEntitySet="Tickets">
|
|
|
+ <ScalarProperty Name="BuyDate" ColumnName="BuyDate" />
|
|
|
+ <ScalarProperty Name="Category" ColumnName="Category" />
|
|
|
+ <ScalarProperty Name="PlaceNumber" ColumnName="PlaceNumber" />
|
|
|
+ <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
|
|
|
+ <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
|
|
|
+ <ScalarProperty Name="IdUser" ColumnName="IdUser" />
|
|
|
+ <ScalarProperty Name="IdTicket" ColumnName="IdTicket" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Trains">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Trains">
|
|
|
+ <MappingFragment StoreEntitySet="Trains">
|
|
|
+ <ScalarProperty Name="NameOfTrain" ColumnName="NameOfTrain" />
|
|
|
+ <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ <EntitySetMapping Name="Users">
|
|
|
+ <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Users">
|
|
|
+ <MappingFragment StoreEntitySet="Users">
|
|
|
+ <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
|
|
|
+ <ScalarProperty Name="Name" ColumnName="Name" />
|
|
|
+ <ScalarProperty Name="Surname" ColumnName="Surname" />
|
|
|
+ <ScalarProperty Name="Passport" ColumnName="Passport" />
|
|
|
+ <ScalarProperty Name="Password" ColumnName="Password" />
|
|
|
+ <ScalarProperty Name="Login" ColumnName="Login" />
|
|
|
+ <ScalarProperty Name="IdUser" ColumnName="IdUser" />
|
|
|
+ </MappingFragment>
|
|
|
+ </EntityTypeMapping>
|
|
|
+ </EntitySetMapping>
|
|
|
+ </EntityContainerMapping>
|
|
|
</Mapping></edmx:Mappings>
|
|
|
</edmx:Runtime>
|
|
|
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|