17 lines
538 B
C#
17 lines
538 B
C#
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using EmployeeManagementApp.Models;
|
|||
|
|
|||
|
namespace EmployeeManagementApp.Services
|
|||
|
{
|
|||
|
public class EmployeeContext : DbContext
|
|||
|
{
|
|||
|
public DbSet<Employee> Employees { get; set; }
|
|||
|
|
|||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|||
|
{
|
|||
|
// Используем MySQL вместо PostgreSQL
|
|||
|
optionsBuilder.UseMySQL("Server=localhost;Port=3306;Database=EmployeeDB;User=root;Password=SuperSecretPasswork2003;");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|