using PortalAccountsDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace PortalAccountsDatabaseImplement { public class PortalAccountsDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=localhost;Port=6456;Database=put_portal_accounts_database;Username=postgres;Password=dan"); } base.OnConfiguring(optionsBuilder); AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true); } public virtual DbSet Accounts { set; get; } public virtual DbSet Interests { set; get; } } }