using EmployeeManagmentDataBaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace EmployeeManagmentDataBaseImplement { public class EmployeeManagementDbContext : DbContext { // DbSets для моделей public virtual DbSet Employees { get; set; } public virtual DbSet PhysicalPersons { get; set; } public virtual DbSet Salaries { get; set; } public virtual DbSet Vacations { get; set; } // Метод для настройки конфигурации protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { optionsBuilder.UseMySQL("Server=localhost;Port=3306;Database=EmployeeDB;User=root;Password=SuperSecretPasswork2003;"); } base.OnConfiguring(optionsBuilder); } } }