using DateBaseImplement.Models; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace DateBaseImplement { public class DBContext : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=COPArtyom;Username=courseuser;Password=courseuser"); base.OnConfiguring(optionsBuilder); } public virtual DbSet Providers { get; set; } public virtual DbSet Types { get; set; } } }