CourseWork_Bank/Bank/BankDataBaseImplement/BankDataBase.cs
2023-05-21 17:01:50 +04:00

31 lines
1.4 KiB
C#

using BankDataBaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
namespace BankDataBaseImplement
{
public class BankDataBase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-VG5USAH\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Conference> Conferences { set; get; }
public virtual DbSet<Room> Rooms { set; get; }
public virtual DbSet<Additions> Additions { set; get; }
public virtual DbSet<ConferenceBooking> ConferenceBookings { set; get; }
public virtual DbSet<Member> Members { set; get; }
public virtual DbSet<Credit> Credits { set; get; }
public virtual DbSet<Clerc> Clercs { set; get; }
public virtual DbSet<Client> Clients { set; get; }
public virtual DbSet<ConferenceMember> ConferenceMembers { set; get; }
public virtual DbSet<RoomCredit> RoomCredits { set; get; }
public virtual DbSet<AdditionsMember> AdditionsMembers { set; get; }
public virtual DbSet<ConferenceBookingDinner> ConferenceBookingDinners { set; get; }
}
}