2023-04-02 16:19:39 +04:00
|
|
|
|
using HotelDataBaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2023-04-01 20:12:06 +04:00
|
|
|
|
|
|
|
|
|
namespace HotelDataBaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class HotelDataBase : DbContext
|
|
|
|
|
{
|
2023-04-02 16:19:39 +04:00
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2023-05-16 01:11:49 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V0ON61E\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
2023-04-02 16:19:39 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Conference> Conferences { set; get; }
|
2023-04-05 11:31:08 +04:00
|
|
|
|
public virtual DbSet<Room> Rooms { set; get; }
|
2023-04-02 16:19:39 +04:00
|
|
|
|
public virtual DbSet<MealPlan> MealPlans { set; get; }
|
2023-04-05 11:13:49 +04:00
|
|
|
|
public virtual DbSet<ConferenceBooking> ConferenceBookings { set; get; }
|
2023-04-02 16:19:39 +04:00
|
|
|
|
public virtual DbSet<Member> Members { set; get; }
|
2023-04-05 11:13:49 +04:00
|
|
|
|
public virtual DbSet<Dinner> Dinners { set; get; }
|
2023-04-02 16:19:39 +04:00
|
|
|
|
public virtual DbSet<Organiser> Organisers { set; get; }
|
2023-04-05 11:37:19 +04:00
|
|
|
|
public virtual DbSet<Headwaiter> Headwaiters { set; get; }
|
2023-04-02 16:19:39 +04:00
|
|
|
|
public virtual DbSet<ConferenceMember> ConferenceMembers { set; get; }
|
2023-04-05 11:31:08 +04:00
|
|
|
|
public virtual DbSet<RoomDinner> RoomDinners { set; get; }
|
2023-04-02 16:19:39 +04:00
|
|
|
|
public virtual DbSet<MealPlanMember> MealPlanMembers { set; get; }
|
2023-04-05 11:13:49 +04:00
|
|
|
|
public virtual DbSet<ConferenceBookingDinner> ConferenceBookingDinners { set; get; }
|
|
|
|
|
|
2023-04-01 20:12:06 +04:00
|
|
|
|
}
|
|
|
|
|
}
|