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 Users { set; get; } public virtual DbSet Diagnoses { set; get; } public virtual DbSet Courses { set; get; } public virtual DbSet CourseDiagnoses { set; get; } } }