using CarCenterDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace CarCenterDatabaseImplement { public class CarCenterDb : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@" Host=localhost; Port=5432; Database=CarCenter; Username=postgres; Password=postgres; Include Error Detail=true"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Implementers { set; get; } public virtual DbSet Requirements { set; get; } public virtual DbSet RequirementByCars { set; get; } public virtual DbSet Directors { set; get; } public virtual DbSet Clients { set; get; } public virtual DbSet ClientsByCars { set; get; } public virtual DbSet Accounts { set; get; } public virtual DbSet Cars { set; get; } } }