using SchoolDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; using System.IO; namespace SchoolDatabaseImplement { public class SchoolDB : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@" Host=localhost; Port=5432; Database=University; Username=postgres; Password=1234; Include Error Detail=true"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Implementers { set; get; } public virtual DbSet Requirements { set; get; } public virtual DbSet RequirementByDisciplines { set; get; } public virtual DbSet Executors { set; get; } public virtual DbSet Students { set; get; } public virtual DbSet StudentsByDisciplines { set; get; } public virtual DbSet Accounts { set; get; } public virtual DbSet Disciplines { set; get; } } }