using Microsoft.EntityFrameworkCore; using PersonnelDepartmentDatabaseImplement.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Type = PersonnelDepartmentDatabaseImplement.Models.Type; namespace PersonnelDepartmentDatabaseImplement { public class PersonnelDepartmentDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=PersonnelDepartment;Username=postgres;Password=adam200396789"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Deals { get; set; } public virtual DbSet Departments { get; set; } public virtual DbSet Employees { get; set; } public virtual DbSet Positions { get; set; } public virtual DbSet Types { get; set; } } }