using UniversityDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace UniversityDatabaseImplement { public class UniversityDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=UniversityDatabase;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Activities { set; get; } public virtual DbSet Disciplines { set; get; } public virtual DbSet ExaminationResults { set; get; } public virtual DbSet ReportTypes { set; get; } public virtual DbSet ReportTypeActivities { set; get; } public virtual DbSet ReportTypeDisciplines { set; get; } public virtual DbSet Statements { set; get; } public virtual DbSet StatementStudents { set; get; } public virtual DbSet Students { set; get; } public virtual DbSet StudentExaminationResults { set; get; } } }