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

26 lines
1.1 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<User> Users { set; get; }
public virtual DbSet<Diagnose> Diagnoses { set; get; }
public virtual DbSet<Course> Courses { set; get; }
public virtual DbSet<CourseDiagnose> CourseDiagnoses { set; get; }
public virtual DbSet<Recipe> Recipes { set; get; }
public virtual DbSet<Procedure> Procedures { set; get; }
public virtual DbSet<Medicament> Medicaments { set; get; }
public virtual DbSet<ProcedureRecipe> ProcedureRecipes { set; get; }
}
}