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)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=ANNZHIMOL\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Conference> Conferences { set; get; }
|
|
|
|
|
public virtual DbSet<MealPlan> MealPlans { set; get; }
|
|
|
|
|
public virtual DbSet<Member> Members { set; get; }
|
|
|
|
|
public virtual DbSet<Organiser> Organisers { set; get; }
|
|
|
|
|
public virtual DbSet<ConferenceMember> ConferenceMembers { set; get; }
|
|
|
|
|
public virtual DbSet<MealPlanMember> MealPlanMembers { set; get; }
|
2023-04-01 20:12:06 +04:00
|
|
|
|
}
|
|
|
|
|
}
|