using Microsoft.EntityFrameworkCore; using SchoolAgainStudyDataBaseImplements.Models; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection.Metadata; using System.Runtime.ConstrainedExecution; using System.Text; using System.Threading.Tasks; using Task = SchoolAgainStudyDataBaseImplements.Models.Task; namespace SchoolAgainStudyDataBaseImplements { public class SchoolDataBase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=SchoolAgainStudyDataBase;Username=postgres;Password=186qazwsx"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Students { 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 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; } } }