CourseWork_Borschevskaya_A..../Hospital/HospitalDatabaseImplement/HospitalDatabase.cs

29 lines
1.4 KiB
C#
Raw Normal View History

using HospitalDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace HospitalDatabaseImplement
{
public class HospitalDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Apothecary> Apothecaries { set; get; }
public virtual DbSet<Recipe> Recipes { set; get; }
public virtual DbSet<Medicine> Medicines { set; get; }
public virtual DbSet<Prescription> Prescriptions { set; get; }
public virtual DbSet<Patient> Patients { set; get; }
public virtual DbSet<Procedure> Procedures { set; get; }
public virtual DbSet<Treatment> Treatments { set; get; }
public virtual DbSet<RecipeMedicine> RecipeMedicines { set; get; }
public virtual DbSet<RecipeTreatment> RecipeTreatments { set; get; }
public virtual DbSet<ProcedureMedicine> ProcedureMedicines { set; get; }
public virtual DbSet<TreatmentProcedure> TreatmentProcedures { set; get; }
}
}