сохранение

This commit is contained in:
Extrimal 2024-04-30 17:18:12 +04:00
commit 4b59d843aa
5 changed files with 1683 additions and 0 deletions

View File

@ -0,0 +1,609 @@
// <auto-generated />
using System;
using HotelDataBaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace HotelDataBaseImplement.Migrations
{
[DbContext(typeof(HotelDataBase))]
[Migration("20240428153913_InitMigration")]
partial class InitMigration
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AdministratorEmail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorLogin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorPassword")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorPhone")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Administrators");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ConferenceName")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.Property<string>("Subject")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("Conferences");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<int?>("ConferenceId")
.HasColumnType("integer");
b.Property<DateTime?>("DateСonference")
.HasColumnType("timestamp without time zone");
b.Property<string>("PlaceСonference")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.HasIndex("ConferenceId");
b.ToTable("ConferenceBookings");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBookingDinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ConferenceBookingId")
.HasColumnType("integer");
b.Property<int>("DinnerId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ConferenceBookingId");
b.HasIndex("DinnerId");
b.ToTable("ConferenceBookingDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceParticipant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ConferenceId")
.HasColumnType("integer");
b.Property<int>("ParticipantId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ConferenceId");
b.HasIndex("ParticipantId");
b.ToTable("ConferenceParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<string>("DinnerName")
.IsRequired()
.HasColumnType("text");
b.Property<double>("DinnerPrice")
.HasColumnType("double precision");
b.Property<int>("DinnerСalorieСontent")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.ToTable("Dinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("MealPlanName")
.IsRequired()
.HasColumnType("text");
b.Property<double>("MealPlanPrice")
.HasColumnType("double precision");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("MealPlans");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanParticipant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("ParticipantId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("MealPlanId");
b.HasIndex("ParticipantId");
b.ToTable("MealPlanParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanRoom", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("MealPlanId");
b.HasIndex("RoomId");
b.ToTable("MealPlanRooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Organiser", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("OrganiserEmail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserLogin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserNumber")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserPassword")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Organisers");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Number")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.Property<string>("ParticipantFIO")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<int>("CountBeds")
.HasColumnType("integer");
b.Property<int?>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("RoomNumber")
.HasColumnType("integer");
b.Property<double>("RoomPrice")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.HasIndex("MealPlanId");
b.ToTable("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.RoomDinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DinnerId")
.HasColumnType("integer");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DinnerId");
b.HasIndex("RoomId");
b.ToTable("RoomDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("Conferences")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("ConferenceBookings")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Conference", "Conference")
.WithMany("Bookings")
.HasForeignKey("ConferenceId");
b.Navigation("Administrator");
b.Navigation("Conference");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBookingDinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.ConferenceBooking", "ConferenceBooking")
.WithMany("Dinners")
.HasForeignKey("ConferenceBookingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Dinner", "Dinner")
.WithMany("ConferenceBookingDinner")
.HasForeignKey("DinnerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ConferenceBooking");
b.Navigation("Dinner");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceParticipant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Conference", "Conference")
.WithMany("Participants")
.HasForeignKey("ConferenceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Participant", "Participant")
.WithMany("ConferenceParticipants")
.HasForeignKey("ParticipantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Conference");
b.Navigation("Participant");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("Dinners")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Administrator");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("MealPlans")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanParticipant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany("Participants")
.HasForeignKey("MealPlanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Participant", "Participant")
.WithMany("MealPlanParticipants")
.HasForeignKey("ParticipantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MealPlan");
b.Navigation("Participant");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanRoom", b =>
{
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany("Rooms")
.HasForeignKey("MealPlanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Room", "Room")
.WithMany("MealPlanRooms")
.HasForeignKey("RoomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MealPlan");
b.Navigation("Room");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("Participants")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("Rooms")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany()
.HasForeignKey("MealPlanId");
b.Navigation("Administrator");
b.Navigation("MealPlan");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.RoomDinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Dinner", "Dinner")
.WithMany("RoomDinners")
.HasForeignKey("DinnerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Room", "Room")
.WithMany("Dinners")
.HasForeignKey("RoomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Dinner");
b.Navigation("Room");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
{
b.Navigation("ConferenceBookings");
b.Navigation("Dinners");
b.Navigation("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.Navigation("Bookings");
b.Navigation("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.Navigation("Dinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.Navigation("ConferenceBookingDinner");
b.Navigation("RoomDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.Navigation("Participants");
b.Navigation("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Organiser", b =>
{
b.Navigation("Conferences");
b.Navigation("MealPlans");
b.Navigation("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.Navigation("ConferenceParticipants");
b.Navigation("MealPlanParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.Navigation("Dinners");
b.Navigation("MealPlanRooms");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,453 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace HotelDataBaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Administrators",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
AdministratorFIO = table.Column<string>(type: "text", nullable: false),
AdministratorPhone = table.Column<string>(type: "text", nullable: false),
AdministratorLogin = table.Column<string>(type: "text", nullable: false),
AdministratorPassword = table.Column<string>(type: "text", nullable: false),
AdministratorEmail = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Administrators", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Organisers",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
OrganiserLogin = table.Column<string>(type: "text", nullable: false),
OrganiserPassword = table.Column<string>(type: "text", nullable: false),
OrganiserEmail = table.Column<string>(type: "text", nullable: false),
OrganiserNumber = table.Column<string>(type: "text", nullable: false),
OrganiserFIO = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Organisers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Dinners",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
DinnerName = table.Column<string>(type: "text", nullable: false),
DinnerСalorieСontent = table.Column<int>(type: "integer", nullable: false),
DinnerPrice = table.Column<double>(type: "double precision", nullable: false),
AdministratorId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Dinners", x => x.Id);
table.ForeignKey(
name: "FK_Dinners_Administrators_AdministratorId",
column: x => x.AdministratorId,
principalTable: "Administrators",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Conferences",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ConferenceName = table.Column<string>(type: "text", nullable: false),
Subject = table.Column<string>(type: "text", nullable: false),
OrganiserId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Conferences", x => x.Id);
table.ForeignKey(
name: "FK_Conferences_Organisers_OrganiserId",
column: x => x.OrganiserId,
principalTable: "Organisers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "MealPlans",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
MealPlanName = table.Column<string>(type: "text", nullable: false),
MealPlanPrice = table.Column<double>(type: "double precision", nullable: false),
OrganiserId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MealPlans", x => x.Id);
table.ForeignKey(
name: "FK_MealPlans_Organisers_OrganiserId",
column: x => x.OrganiserId,
principalTable: "Organisers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Participants",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ParticipantFIO = table.Column<string>(type: "text", nullable: false),
Number = table.Column<string>(type: "text", nullable: false),
OrganiserId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Participants", x => x.Id);
table.ForeignKey(
name: "FK_Participants_Organisers_OrganiserId",
column: x => x.OrganiserId,
principalTable: "Organisers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ConferenceBookings",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
DateСonference = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
AdministratorId = table.Column<int>(type: "integer", nullable: false),
ConferenceId = table.Column<int>(type: "integer", nullable: true),
PlaceСonference = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ConferenceBookings", x => x.Id);
table.ForeignKey(
name: "FK_ConferenceBookings_Administrators_AdministratorId",
column: x => x.AdministratorId,
principalTable: "Administrators",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ConferenceBookings_Conferences_ConferenceId",
column: x => x.ConferenceId,
principalTable: "Conferences",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Rooms",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RoomNumber = table.Column<int>(type: "integer", nullable: false),
CountBeds = table.Column<int>(type: "integer", nullable: false),
RoomPrice = table.Column<double>(type: "double precision", nullable: false),
AdministratorId = table.Column<int>(type: "integer", nullable: false),
MealPlanId = table.Column<int>(type: "integer", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Rooms", x => x.Id);
table.ForeignKey(
name: "FK_Rooms_Administrators_AdministratorId",
column: x => x.AdministratorId,
principalTable: "Administrators",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Rooms_MealPlans_MealPlanId",
column: x => x.MealPlanId,
principalTable: "MealPlans",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "ConferenceParticipants",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ParticipantId = table.Column<int>(type: "integer", nullable: false),
ConferenceId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ConferenceParticipants", x => x.Id);
table.ForeignKey(
name: "FK_ConferenceParticipants_Conferences_ConferenceId",
column: x => x.ConferenceId,
principalTable: "Conferences",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ConferenceParticipants_Participants_ParticipantId",
column: x => x.ParticipantId,
principalTable: "Participants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "MealPlanParticipants",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ParticipantId = table.Column<int>(type: "integer", nullable: false),
MealPlanId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MealPlanParticipants", x => x.Id);
table.ForeignKey(
name: "FK_MealPlanParticipants_MealPlans_MealPlanId",
column: x => x.MealPlanId,
principalTable: "MealPlans",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MealPlanParticipants_Participants_ParticipantId",
column: x => x.ParticipantId,
principalTable: "Participants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ConferenceBookingDinners",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ConferenceBookingId = table.Column<int>(type: "integer", nullable: false),
DinnerId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ConferenceBookingDinners", x => x.Id);
table.ForeignKey(
name: "FK_ConferenceBookingDinners_ConferenceBookings_ConferenceBooki~",
column: x => x.ConferenceBookingId,
principalTable: "ConferenceBookings",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ConferenceBookingDinners_Dinners_DinnerId",
column: x => x.DinnerId,
principalTable: "Dinners",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "MealPlanRooms",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RoomId = table.Column<int>(type: "integer", nullable: false),
MealPlanId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MealPlanRooms", x => x.Id);
table.ForeignKey(
name: "FK_MealPlanRooms_MealPlans_MealPlanId",
column: x => x.MealPlanId,
principalTable: "MealPlans",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MealPlanRooms_Rooms_RoomId",
column: x => x.RoomId,
principalTable: "Rooms",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "RoomDinners",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RoomId = table.Column<int>(type: "integer", nullable: false),
DinnerId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RoomDinners", x => x.Id);
table.ForeignKey(
name: "FK_RoomDinners_Dinners_DinnerId",
column: x => x.DinnerId,
principalTable: "Dinners",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RoomDinners_Rooms_RoomId",
column: x => x.RoomId,
principalTable: "Rooms",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_ConferenceBookingDinners_ConferenceBookingId",
table: "ConferenceBookingDinners",
column: "ConferenceBookingId");
migrationBuilder.CreateIndex(
name: "IX_ConferenceBookingDinners_DinnerId",
table: "ConferenceBookingDinners",
column: "DinnerId");
migrationBuilder.CreateIndex(
name: "IX_ConferenceBookings_AdministratorId",
table: "ConferenceBookings",
column: "AdministratorId");
migrationBuilder.CreateIndex(
name: "IX_ConferenceBookings_ConferenceId",
table: "ConferenceBookings",
column: "ConferenceId");
migrationBuilder.CreateIndex(
name: "IX_ConferenceParticipants_ConferenceId",
table: "ConferenceParticipants",
column: "ConferenceId");
migrationBuilder.CreateIndex(
name: "IX_ConferenceParticipants_ParticipantId",
table: "ConferenceParticipants",
column: "ParticipantId");
migrationBuilder.CreateIndex(
name: "IX_Conferences_OrganiserId",
table: "Conferences",
column: "OrganiserId");
migrationBuilder.CreateIndex(
name: "IX_Dinners_AdministratorId",
table: "Dinners",
column: "AdministratorId");
migrationBuilder.CreateIndex(
name: "IX_MealPlanParticipants_MealPlanId",
table: "MealPlanParticipants",
column: "MealPlanId");
migrationBuilder.CreateIndex(
name: "IX_MealPlanParticipants_ParticipantId",
table: "MealPlanParticipants",
column: "ParticipantId");
migrationBuilder.CreateIndex(
name: "IX_MealPlanRooms_MealPlanId",
table: "MealPlanRooms",
column: "MealPlanId");
migrationBuilder.CreateIndex(
name: "IX_MealPlanRooms_RoomId",
table: "MealPlanRooms",
column: "RoomId");
migrationBuilder.CreateIndex(
name: "IX_MealPlans_OrganiserId",
table: "MealPlans",
column: "OrganiserId");
migrationBuilder.CreateIndex(
name: "IX_Participants_OrganiserId",
table: "Participants",
column: "OrganiserId");
migrationBuilder.CreateIndex(
name: "IX_RoomDinners_DinnerId",
table: "RoomDinners",
column: "DinnerId");
migrationBuilder.CreateIndex(
name: "IX_RoomDinners_RoomId",
table: "RoomDinners",
column: "RoomId");
migrationBuilder.CreateIndex(
name: "IX_Rooms_AdministratorId",
table: "Rooms",
column: "AdministratorId");
migrationBuilder.CreateIndex(
name: "IX_Rooms_MealPlanId",
table: "Rooms",
column: "MealPlanId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ConferenceBookingDinners");
migrationBuilder.DropTable(
name: "ConferenceParticipants");
migrationBuilder.DropTable(
name: "MealPlanParticipants");
migrationBuilder.DropTable(
name: "MealPlanRooms");
migrationBuilder.DropTable(
name: "RoomDinners");
migrationBuilder.DropTable(
name: "ConferenceBookings");
migrationBuilder.DropTable(
name: "Participants");
migrationBuilder.DropTable(
name: "Dinners");
migrationBuilder.DropTable(
name: "Rooms");
migrationBuilder.DropTable(
name: "Conferences");
migrationBuilder.DropTable(
name: "Administrators");
migrationBuilder.DropTable(
name: "MealPlans");
migrationBuilder.DropTable(
name: "Organisers");
}
}
}

View File

@ -0,0 +1,606 @@
// <auto-generated />
using System;
using HotelDataBaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace HotelDataBaseImplement.Migrations
{
[DbContext(typeof(HotelDataBase))]
partial class HotelDataBaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AdministratorEmail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorLogin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorPassword")
.IsRequired()
.HasColumnType("text");
b.Property<string>("AdministratorPhone")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Administrators");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ConferenceName")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.Property<string>("Subject")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("Conferences");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<int?>("ConferenceId")
.HasColumnType("integer");
b.Property<DateTime?>("DateСonference")
.HasColumnType("timestamp without time zone");
b.Property<string>("PlaceСonference")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.HasIndex("ConferenceId");
b.ToTable("ConferenceBookings");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBookingDinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ConferenceBookingId")
.HasColumnType("integer");
b.Property<int>("DinnerId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ConferenceBookingId");
b.HasIndex("DinnerId");
b.ToTable("ConferenceBookingDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceParticipant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ConferenceId")
.HasColumnType("integer");
b.Property<int>("ParticipantId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ConferenceId");
b.HasIndex("ParticipantId");
b.ToTable("ConferenceParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<string>("DinnerName")
.IsRequired()
.HasColumnType("text");
b.Property<double>("DinnerPrice")
.HasColumnType("double precision");
b.Property<int>("DinnerСalorieСontent")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.ToTable("Dinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("MealPlanName")
.IsRequired()
.HasColumnType("text");
b.Property<double>("MealPlanPrice")
.HasColumnType("double precision");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("MealPlans");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanParticipant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("ParticipantId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("MealPlanId");
b.HasIndex("ParticipantId");
b.ToTable("MealPlanParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanRoom", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("MealPlanId");
b.HasIndex("RoomId");
b.ToTable("MealPlanRooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Organiser", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("OrganiserEmail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserLogin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserNumber")
.IsRequired()
.HasColumnType("text");
b.Property<string>("OrganiserPassword")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Organisers");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Number")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OrganiserId")
.HasColumnType("integer");
b.Property<string>("ParticipantFIO")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OrganiserId");
b.ToTable("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AdministratorId")
.HasColumnType("integer");
b.Property<int>("CountBeds")
.HasColumnType("integer");
b.Property<int?>("MealPlanId")
.HasColumnType("integer");
b.Property<int>("RoomNumber")
.HasColumnType("integer");
b.Property<double>("RoomPrice")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("AdministratorId");
b.HasIndex("MealPlanId");
b.ToTable("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.RoomDinner", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DinnerId")
.HasColumnType("integer");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DinnerId");
b.HasIndex("RoomId");
b.ToTable("RoomDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("Conferences")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("ConferenceBookings")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Conference", "Conference")
.WithMany("Bookings")
.HasForeignKey("ConferenceId");
b.Navigation("Administrator");
b.Navigation("Conference");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBookingDinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.ConferenceBooking", "ConferenceBooking")
.WithMany("Dinners")
.HasForeignKey("ConferenceBookingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Dinner", "Dinner")
.WithMany("ConferenceBookingDinner")
.HasForeignKey("DinnerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ConferenceBooking");
b.Navigation("Dinner");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceParticipant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Conference", "Conference")
.WithMany("Participants")
.HasForeignKey("ConferenceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Participant", "Participant")
.WithMany("ConferenceParticipants")
.HasForeignKey("ParticipantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Conference");
b.Navigation("Participant");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("Dinners")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Administrator");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("MealPlans")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanParticipant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany("Participants")
.HasForeignKey("MealPlanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Participant", "Participant")
.WithMany("MealPlanParticipants")
.HasForeignKey("ParticipantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MealPlan");
b.Navigation("Participant");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlanRoom", b =>
{
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany("Rooms")
.HasForeignKey("MealPlanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Room", "Room")
.WithMany("MealPlanRooms")
.HasForeignKey("RoomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MealPlan");
b.Navigation("Room");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Organiser", "Organiser")
.WithMany("Participants")
.HasForeignKey("OrganiserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organiser");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Administrator", "Administrator")
.WithMany("Rooms")
.HasForeignKey("AdministratorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.MealPlan", "MealPlan")
.WithMany()
.HasForeignKey("MealPlanId");
b.Navigation("Administrator");
b.Navigation("MealPlan");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.RoomDinner", b =>
{
b.HasOne("HotelDataBaseImplement.Models.Dinner", "Dinner")
.WithMany("RoomDinners")
.HasForeignKey("DinnerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HotelDataBaseImplement.Models.Room", "Room")
.WithMany("Dinners")
.HasForeignKey("RoomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Dinner");
b.Navigation("Room");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
{
b.Navigation("ConferenceBookings");
b.Navigation("Dinners");
b.Navigation("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Conference", b =>
{
b.Navigation("Bookings");
b.Navigation("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.ConferenceBooking", b =>
{
b.Navigation("Dinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Dinner", b =>
{
b.Navigation("ConferenceBookingDinner");
b.Navigation("RoomDinners");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.MealPlan", b =>
{
b.Navigation("Participants");
b.Navigation("Rooms");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Organiser", b =>
{
b.Navigation("Conferences");
b.Navigation("MealPlans");
b.Navigation("Participants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Participant", b =>
{
b.Navigation("ConferenceParticipants");
b.Navigation("MealPlanParticipants");
});
modelBuilder.Entity("HotelDataBaseImplement.Models.Room", b =>
{
b.Navigation("Dinners");
b.Navigation("MealPlanRooms");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -7,6 +7,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="6.1.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="6.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup> </ItemGroup>

View File

@ -8,4 +8,15 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HotelDataBaseImplement\HotelDataBaseImplement.csproj" />
</ItemGroup>
</Project> </Project>