using Microsoft.EntityFrameworkCore; using UniversityDatabaseImplement.Models; namespace UniversityDatabaseImplement { public class UniversityDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { //Возможно понадобится писать вместо (localdb) название пк, вот пк Егора: DESKTOP-N8BRIPR; other-name: LAPTOP-DYCTATOR optionsBuilder.UseSqlServer(@"Data Source=(localdb)\UniversityDatabase;Initial Catalog=UniversityDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Students { set; get; } public virtual DbSet PlanOfStudys { set; get; } public virtual DbSet Attestations { set; get; } public virtual DbSet Workers { set; get; } public virtual DbSet Storekeepers { set; get; } public virtual DbSet Teachers { set; get; } public virtual DbSet Disciplines { set; get; } public virtual DbSet Statements { set; get; } public virtual DbSet StudentDisciplines { set; get; } public virtual DbSet PlanOfStudyTeachers { set; get; } } }