30 lines
1.3 KiB
C#
30 lines
1.3 KiB
C#
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using HospitalDatabaseImplement.Models;
|
|||
|
|
|||
|
namespace SecuritySystemDatabaseImplement
|
|||
|
{
|
|||
|
public class HospitalDatabase : DbContext
|
|||
|
{
|
|||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|||
|
{
|
|||
|
if (optionsBuilder.IsConfigured == false)
|
|||
|
{
|
|||
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=HospitalDatabase1;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|||
|
}
|
|||
|
base.OnConfiguring(optionsBuilder);
|
|||
|
}
|
|||
|
public virtual DbSet<Course> Courses { set; get; }
|
|||
|
public virtual DbSet<CourseDiagnose> CourseDiagnoses { set; get; }
|
|||
|
public virtual DbSet<Diagnose> Diagnoses { set; get; }
|
|||
|
public virtual DbSet<Drug> Drugs { set; get; }
|
|||
|
public virtual DbSet<Procedure> Procedures { set; get; }
|
|||
|
public virtual DbSet<RecipeProcedure> RecipeProcedures { set; get; }
|
|||
|
public virtual DbSet<Recipe> Recipes { set; get; }
|
|||
|
public virtual DbSet<Symptom> Symptomes { set; get; }
|
|||
|
public virtual DbSet<SymptomDiagnose> SymptomDiagnoses { set; get; }
|
|||
|
public virtual DbSet<SymptomRecipe> SymptomRecipes { set; get; }
|
|||
|
public virtual DbSet<User> Users { set; get; }
|
|||
|
|
|||
|
}
|
|||
|
}
|