Rogashova_E.A._CourseWork_H.../HospitalDataBaseImplements/HospitalDatabase.cs

35 lines
1.4 KiB
C#
Raw Normal View History

2023-04-05 23:24:58 +04:00
using HospitalDataBaseImplements.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalDataBaseImplements
{
public class HospitalDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-0BJHUJC\SQLEXPRESS;Initial Catalog=GiftShopDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Kurses> Kurse { set; get; }
public virtual DbSet<Illness> Illnesses { set; get; }
public virtual DbSet<IllnessKurse> IllnessKurse { set; get; }
public virtual DbSet<IllnessSymptoms> IllnessSymptomses { set; get; }
public virtual DbSet<RecipesSymptoms> RecipesSymptoms { set; get; }
public virtual DbSet<RecipesProcedures> RecipesProcedures { set; get; }
public virtual DbSet<Symptoms> Symptomses { set; get; }
public virtual DbSet<Recipes> Recipes { set; get; }
public virtual DbSet<Medicines> Medicines { set; get; }
public virtual DbSet<Procedures> Procedures { set; get; }
public virtual DbSet<Client> Clients { set; get; }
2023-04-05 23:24:58 +04:00
}
}