using Microsoft.EntityFrameworkCore; using SchoolAgainStudyDataBaseImplements.Models; using SchoolAgainStudyDataModels.Models; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.ConstrainedExecution; using System.Text; using Task = SchoolAgainStudyDataBaseImplements.Models.Task; namespace SchoolAgainStudyDataBaseImplements { public class SchoolDataBase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Server=PostgreSQL;Host=localhost;Port=5432;Database=SchoolAgainStudyDataBase;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Students { set; get; } public virtual DbSet StudentInterests { set; get; } public virtual DbSet Interests { set; get; } public virtual DbSet Diys { set; get; } public virtual DbSet DiyInterests { set; get; } public virtual DbSet Products { set; get; } public virtual DbSet ProductInterests { set; get; } public virtual DbSet Teachers { set; get; } public virtual DbSet TeacherMaterials { set; get; } public virtual DbSet Materials { set; get; } public virtual DbSet Lessons { set; get; } public virtual DbSet LessonMaterials { set; get; } public virtual DbSet Tasks { set; get; } public virtual DbSet TaskMaterials { set; get; } } }