/
lirikkrd
/
API
Обзор
Документация
Войти
/
lirikkrd
/
API
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Entities/BaseModel.edmx
446 строк
23 KB
kiril
Добавьте файлы проекта.
12 ноя 2025, 22:20
12 ноя 2025, 22:20
7811891
Код
Авторство
О чём код?
<?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx"> <!-- EF Runtime content --> <edmx:Runtime> <!-- SSDL content --> <edmx:StorageModels> <Schema Namespace="Хранилище ToursBaseModel" 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="Country"> <Key> <PropertyRef Name="Code" /> </Key> <Property Name="Code" Type="nchar" MaxLength="2" Nullable="false" /> <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" /> </EntityType> <EntityType Name="Hotel"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" /> <Property Name="CountOfStars" Type="int" Nullable="false" /> <Property Name="CountryCode" Type="nchar" MaxLength="2" Nullable="false" /> </EntityType> <EntityType Name="HotelComment"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="HotelId" Type="int" Nullable="false" /> <Property Name="Text" Type="nvarchar(max)" Nullable="false" /> <Property Name="Author" Type="nvarchar" MaxLength="100" Nullable="false" /> <Property Name="CreationDate" Type="datetime" Nullable="false" /> </EntityType> <EntityType Name="HotelImage"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="HotelId" Type="int" Nullable="false" /> <Property Name="ImageSource" Type="varbinary(max)" Nullable="false" /> </EntityType> <EntityType Name="HotelOfTour"> <Key> <PropertyRef Name="HotelId" /> <PropertyRef Name="TourId" /> </Key> <Property Name="HotelId" Type="int" Nullable="false" /> <Property Name="TourId" Type="int" Nullable="false" /> </EntityType> <EntityType Name="Tour"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="TicketCount" Type="int" Nullable="false" /> <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" /> <Property Name="Description" Type="nvarchar(max)" /> <Property Name="ImagePreview" Type="varbinary(max)" /> <Property Name="Price" Type="money" Nullable="false" /> <Property Name="IsActual" Type="bit" Nullable="false" /> </EntityType> <EntityType Name="Type"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" /> <Property Name="Description" Type="nvarchar(max)" /> </EntityType> <EntityType Name="TypeOfTour"> <Key> <PropertyRef Name="TourId" /> <PropertyRef Name="TypeId" /> </Key> <Property Name="TourId" Type="int" Nullable="false" /> <Property Name="TypeId" Type="int" Nullable="false" /> </EntityType> <Association Name="FK_Hotel_Country"> <End Role="Country" Type="Self.Country" Multiplicity="1" /> <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Country"> <PropertyRef Name="Code" /> </Principal> <Dependent Role="Hotel"> <PropertyRef Name="CountryCode" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelComment_Hotel"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" /> <End Role="HotelComment" Type="Self.HotelComment" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Hotel"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelComment"> <PropertyRef Name="HotelId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelImage_Hotel"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" /> <End Role="HotelImage" Type="Self.HotelImage" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Hotel"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelImage"> <PropertyRef Name="HotelId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelOfTour_Hotel"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" /> <End Role="HotelOfTour" Type="Self.HotelOfTour" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Hotel"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelOfTour"> <PropertyRef Name="HotelId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelOfTour_Tour"> <End Role="Tour" Type="Self.Tour" Multiplicity="1" /> <End Role="HotelOfTour" Type="Self.HotelOfTour" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Tour"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelOfTour"> <PropertyRef Name="TourId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_TypeOfTour_Tour"> <End Role="Tour" Type="Self.Tour" Multiplicity="1" /> <End Role="TypeOfTour" Type="Self.TypeOfTour" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Tour"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="TypeOfTour"> <PropertyRef Name="TourId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_TypeOfTour_Type"> <End Role="Type" Type="Self.Type" Multiplicity="1" /> <End Role="TypeOfTour" Type="Self.TypeOfTour" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Type"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="TypeOfTour"> <PropertyRef Name="TypeId" /> </Dependent> </ReferentialConstraint> </Association> <EntityContainer Name="Хранилище ToursBaseModelContainer"> <EntitySet Name="Country" EntityType="Self.Country" Schema="dbo" store:Type="Tables" /> <EntitySet Name="Hotel" EntityType="Self.Hotel" Schema="dbo" store:Type="Tables" /> <EntitySet Name="HotelComment" EntityType="Self.HotelComment" Schema="dbo" store:Type="Tables" /> <EntitySet Name="HotelImage" EntityType="Self.HotelImage" Schema="dbo" store:Type="Tables" /> <EntitySet Name="HotelOfTour" EntityType="Self.HotelOfTour" Schema="dbo" store:Type="Tables" /> <EntitySet Name="Tour" EntityType="Self.Tour" Schema="dbo" store:Type="Tables" /> <EntitySet Name="Type" EntityType="Self.Type" Schema="dbo" store:Type="Tables" /> <EntitySet Name="TypeOfTour" EntityType="Self.TypeOfTour" Schema="dbo" store:Type="Tables" /> <AssociationSet Name="FK_Hotel_Country" Association="Self.FK_Hotel_Country"> <End Role="Country" EntitySet="Country" /> <End Role="Hotel" EntitySet="Hotel" /> </AssociationSet> <AssociationSet Name="FK_HotelComment_Hotel" Association="Self.FK_HotelComment_Hotel"> <End Role="Hotel" EntitySet="Hotel" /> <End Role="HotelComment" EntitySet="HotelComment" /> </AssociationSet> <AssociationSet Name="FK_HotelImage_Hotel" Association="Self.FK_HotelImage_Hotel"> <End Role="Hotel" EntitySet="Hotel" /> <End Role="HotelImage" EntitySet="HotelImage" /> </AssociationSet> <AssociationSet Name="FK_HotelOfTour_Hotel" Association="Self.FK_HotelOfTour_Hotel"> <End Role="Hotel" EntitySet="Hotel" /> <End Role="HotelOfTour" EntitySet="HotelOfTour" /> </AssociationSet> <AssociationSet Name="FK_HotelOfTour_Tour" Association="Self.FK_HotelOfTour_Tour"> <End Role="Tour" EntitySet="Tour" /> <End Role="HotelOfTour" EntitySet="HotelOfTour" /> </AssociationSet> <AssociationSet Name="FK_TypeOfTour_Tour" Association="Self.FK_TypeOfTour_Tour"> <End Role="Tour" EntitySet="Tour" /> <End Role="TypeOfTour" EntitySet="TypeOfTour" /> </AssociationSet> <AssociationSet Name="FK_TypeOfTour_Type" Association="Self.FK_TypeOfTour_Type"> <End Role="Type" EntitySet="Type" /> <End Role="TypeOfTour" EntitySet="TypeOfTour" /> </AssociationSet> </EntityContainer> </Schema> </edmx:StorageModels> <!-- CSDL content --> <edmx:ConceptualModels> <Schema Namespace="ToursBaseModel" 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="Country"> <Key> <PropertyRef Name="Code" /> </Key> <Property Name="Code" Type="String" MaxLength="2" FixedLength="true" Unicode="true" Nullable="false" /> <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" /> <NavigationProperty Name="Hotels" Relationship="Self.FK_Hotel_Country" FromRole="Country" ToRole="Hotel" /> </EntityType> <EntityType Name="Hotel"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" /> <Property Name="CountOfStars" Type="Int32" Nullable="false" /> <Property Name="CountryCode" Type="String" MaxLength="2" FixedLength="true" Unicode="true" Nullable="false" /> <NavigationProperty Name="Country" Relationship="Self.FK_Hotel_Country" FromRole="Hotel" ToRole="Country" /> <NavigationProperty Name="HotelComments" Relationship="Self.FK_HotelComment_Hotel" FromRole="Hotel" ToRole="HotelComment" /> <NavigationProperty Name="HotelImages" Relationship="Self.FK_HotelImage_Hotel" FromRole="Hotel" ToRole="HotelImage" /> <NavigationProperty Name="Tours" Relationship="Self.HotelOfTour" FromRole="Hotel" ToRole="Tour" /> </EntityType> <EntityType Name="HotelComment"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="HotelId" Type="Int32" Nullable="false" /> <Property Name="Text" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" /> <Property Name="Author" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" /> <Property Name="CreationDate" Type="DateTime" Nullable="false" Precision="3" /> <NavigationProperty Name="Hotel" Relationship="Self.FK_HotelComment_Hotel" FromRole="HotelComment" ToRole="Hotel" /> </EntityType> <EntityType Name="HotelImage"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="HotelId" Type="Int32" Nullable="false" /> <Property Name="ImageSource" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" /> <NavigationProperty Name="Hotel" Relationship="Self.FK_HotelImage_Hotel" FromRole="HotelImage" ToRole="Hotel" /> </EntityType> <EntityType Name="Tour"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="TicketCount" Type="Int32" Nullable="false" /> <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" /> <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" /> <Property Name="ImagePreview" Type="Binary" MaxLength="Max" FixedLength="false" /> <Property Name="Price" Type="Decimal" Precision="19" Scale="4" Nullable="false" /> <Property Name="IsActual" Type="Boolean" Nullable="false" /> <NavigationProperty Name="Hotels" Relationship="Self.HotelOfTour" FromRole="Tour" ToRole="Hotel" /> <NavigationProperty Name="Types" Relationship="Self.TypeOfTour" FromRole="Tour" ToRole="Type" /> </EntityType> <EntityType Name="Type"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" /> <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" /> <NavigationProperty Name="Tours" Relationship="Self.TypeOfTour" FromRole="Type" ToRole="Tour" /> </EntityType> <Association Name="FK_Hotel_Country"> <End Role="Country" Type="Self.Country" Multiplicity="1" /> <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Country"> <PropertyRef Name="Code" /> </Principal> <Dependent Role="Hotel"> <PropertyRef Name="CountryCode" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelComment_Hotel"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" /> <End Role="HotelComment" Type="Self.HotelComment" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Hotel"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelComment"> <PropertyRef Name="HotelId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="FK_HotelImage_Hotel"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" /> <End Role="HotelImage" Type="Self.HotelImage" Multiplicity="*" /> <ReferentialConstraint> <Principal Role="Hotel"> <PropertyRef Name="Id" /> </Principal> <Dependent Role="HotelImage"> <PropertyRef Name="HotelId" /> </Dependent> </ReferentialConstraint> </Association> <Association Name="HotelOfTour"> <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" /> <End Role="Tour" Type="Self.Tour" Multiplicity="*" /> </Association> <Association Name="TypeOfTour"> <End Role="Tour" Type="Self.Tour" Multiplicity="*" /> <End Role="Type" Type="Self.Type" Multiplicity="*" /> </Association> <EntityContainer Name="ToursBaseEntities" annotation:LazyLoadingEnabled="true"> <EntitySet Name="Countries" EntityType="Self.Country" /> <EntitySet Name="Hotels" EntityType="Self.Hotel" /> <EntitySet Name="HotelComments" EntityType="Self.HotelComment" /> <EntitySet Name="HotelImages" EntityType="Self.HotelImage" /> <EntitySet Name="Tours" EntityType="Self.Tour" /> <EntitySet Name="Types" EntityType="Self.Type" /> <AssociationSet Name="FK_Hotel_Country" Association="Self.FK_Hotel_Country"> <End Role="Country" EntitySet="Countries" /> <End Role="Hotel" EntitySet="Hotels" /> </AssociationSet> <AssociationSet Name="FK_HotelComment_Hotel" Association="Self.FK_HotelComment_Hotel"> <End Role="Hotel" EntitySet="Hotels" /> <End Role="HotelComment" EntitySet="HotelComments" /> </AssociationSet> <AssociationSet Name="FK_HotelImage_Hotel" Association="Self.FK_HotelImage_Hotel"> <End Role="Hotel" EntitySet="Hotels" /> <End Role="HotelImage" EntitySet="HotelImages" /> </AssociationSet> <AssociationSet Name="HotelOfTour" Association="Self.HotelOfTour"> <End Role="Hotel" EntitySet="Hotels" /> <End Role="Tour" EntitySet="Tours" /> </AssociationSet> <AssociationSet Name="TypeOfTour" Association="Self.TypeOfTour"> <End Role="Tour" EntitySet="Tours" /> <End Role="Type" EntitySet="Types" /> </AssociationSet> </EntityContainer> </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="Хранилище ToursBaseModelContainer" CdmEntityContainer="ToursBaseEntities"> <EntitySetMapping Name="Countries"> <EntityTypeMapping TypeName="ToursBaseModel.Country"> <MappingFragment StoreEntitySet="Country"> <ScalarProperty Name="Code" ColumnName="Code" /> <ScalarProperty Name="Name" ColumnName="Name" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <EntitySetMapping Name="Hotels"> <EntityTypeMapping TypeName="ToursBaseModel.Hotel"> <MappingFragment StoreEntitySet="Hotel"> <ScalarProperty Name="Id" ColumnName="Id" /> <ScalarProperty Name="Name" ColumnName="Name" /> <ScalarProperty Name="CountOfStars" ColumnName="CountOfStars" /> <ScalarProperty Name="CountryCode" ColumnName="CountryCode" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <EntitySetMapping Name="HotelComments"> <EntityTypeMapping TypeName="ToursBaseModel.HotelComment"> <MappingFragment StoreEntitySet="HotelComment"> <ScalarProperty Name="Id" ColumnName="Id" /> <ScalarProperty Name="HotelId" ColumnName="HotelId" /> <ScalarProperty Name="Text" ColumnName="Text" /> <ScalarProperty Name="Author" ColumnName="Author" /> <ScalarProperty Name="CreationDate" ColumnName="CreationDate" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <EntitySetMapping Name="HotelImages"> <EntityTypeMapping TypeName="ToursBaseModel.HotelImage"> <MappingFragment StoreEntitySet="HotelImage"> <ScalarProperty Name="Id" ColumnName="Id" /> <ScalarProperty Name="HotelId" ColumnName="HotelId" /> <ScalarProperty Name="ImageSource" ColumnName="ImageSource" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <EntitySetMapping Name="Tours"> <EntityTypeMapping TypeName="ToursBaseModel.Tour"> <MappingFragment StoreEntitySet="Tour"> <ScalarProperty Name="Id" ColumnName="Id" /> <ScalarProperty Name="TicketCount" ColumnName="TicketCount" /> <ScalarProperty Name="Name" ColumnName="Name" /> <ScalarProperty Name="Description" ColumnName="Description" /> <ScalarProperty Name="ImagePreview" ColumnName="ImagePreview" /> <ScalarProperty Name="Price" ColumnName="Price" /> <ScalarProperty Name="IsActual" ColumnName="IsActual" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <EntitySetMapping Name="Types"> <EntityTypeMapping TypeName="ToursBaseModel.Type"> <MappingFragment StoreEntitySet="Type"> <ScalarProperty Name="Id" ColumnName="Id" /> <ScalarProperty Name="Name" ColumnName="Name" /> <ScalarProperty Name="Description" ColumnName="Description" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> <AssociationSetMapping Name="HotelOfTour" TypeName="ToursBaseModel.HotelOfTour" StoreEntitySet="HotelOfTour"> <EndProperty Name="Hotel"> <ScalarProperty Name="Id" ColumnName="HotelId" /> </EndProperty> <EndProperty Name="Tour"> <ScalarProperty Name="Id" ColumnName="TourId" /> </EndProperty> </AssociationSetMapping> <AssociationSetMapping Name="TypeOfTour" TypeName="ToursBaseModel.TypeOfTour" StoreEntitySet="TypeOfTour"> <EndProperty Name="Tour"> <ScalarProperty Name="Id" ColumnName="TourId" /> </EndProperty> <EndProperty Name="Type"> <ScalarProperty Name="Id" ColumnName="TypeId" /> </EndProperty> </AssociationSetMapping> </EntityContainerMapping> </Mapping> </edmx:Mappings> </edmx:Runtime> <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) --> <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx"> <Connection> <DesignerInfoPropertySet> <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" /> </DesignerInfoPropertySet> </Connection> <Options> <DesignerInfoPropertySet> <DesignerProperty Name="ValidateOnBuild" Value="true" /> <DesignerProperty Name="EnablePluralization" Value="true" /> <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" /> <DesignerProperty Name="UseLegacyProvider" Value="false" /> <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" /> </DesignerInfoPropertySet> </Options> <!-- Diagram content (shape and connector positions) --> <Diagrams></Diagrams> </Designer> </edmx:Edmx>