PIbd-22_Karamushko_M_K_Univ.../University/DatabaseImplement/UniversityDatabase.cs
2023-04-02 17:39:42 +04:00

27 lines
1.3 KiB
C#

using UniversityDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace PizzeriaDatabaseImplement
{
public class PizzeriaDatabase : 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<Activity> Activity { set; get; }
public virtual DbSet<Discipline> Discipline { set; get; }
public virtual DbSet<ExaminationResult> ExaminationResult { set; get; }
public virtual DbSet<ReportType> ReportType { set; get; }
public virtual DbSet<ReportTypeActivity> ReportTypeActivity { set; get; }
public virtual DbSet<ReportTypeDiscipline> ReportTypeDiscipline { set; get; }
public virtual DbSet<Statement> Statement { set; get; }
public virtual DbSet<StatementStudent> StatementStudent { set; get; }
public virtual DbSet<Student> Student { set; get; }
public virtual DbSet<StudentExaminationResult> StudentExaminationResult { set; get; }
}
}