2024-04-28 11:41:30 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2024-04-28 16:09:47 +04:00
|
|
|
|
using PolyclinicDatabaseImplement.Models;
|
2024-04-28 11:41:30 +04:00
|
|
|
|
|
|
|
|
|
namespace SecuritySystemDatabaseImplement
|
|
|
|
|
{
|
2024-04-28 16:29:57 +04:00
|
|
|
|
public class PolyclinicDatabase : DbContext
|
2024-04-28 11:41:30 +04:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
2024-04-28 16:09:47 +04:00
|
|
|
|
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; }
|
2024-04-28 18:13:52 +04:00
|
|
|
|
public virtual DbSet<Recipe> Recipes { set; get; }
|
|
|
|
|
public virtual DbSet<Procedure> Procedures { set; get; }
|
2024-04-29 21:10:25 +04:00
|
|
|
|
public virtual DbSet<Medicament> Medicaments { set; get; }
|
2024-04-28 18:13:52 +04:00
|
|
|
|
public virtual DbSet<ProcedureRecipe> ProcedureRecipes { set; get; }
|
2024-04-28 11:41:30 +04:00
|
|
|
|
}
|
|
|
|
|
}
|