PIbd-21_CourseWork_Polyclin.../Polyclinic/PolyclinicDatabaseImplement/PolyclinicDatabase.cs

30 lines
1.3 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using PolyclinicDatabaseImplement.Models;
namespace SecuritySystemDatabaseImplement
{
public class PolyclinicDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=PolyclinicDatabase;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<Medicament> Medicaments { set; get; }
public virtual DbSet<Procedure> Procedures { set; get; }
public virtual DbSet<ProcedureRecipe> ProcedureRecipes { 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; }
}
}