using DataBaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace DataBaseImplement { public class DBContext:DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if(!optionsBuilder.IsConfigured) optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=COP;Username=courseuser;Password=courseuser"); base.OnConfiguring(optionsBuilder); } public virtual DbSet Providers { get; set; } public virtual DbSet Types { get; set; } } }