Files
Backend-Api/CompanyManagment.EFCore/Mapping/EmployeeAccountMapping.cs
2024-07-05 21:36:15 +03:30

14 lines
455 B
C#

using Company.Domain.EmployeeAccountAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class EmployeeAccountMapping : IEntityTypeConfiguration<EmployeeAccount>
{
public void Configure(EntityTypeBuilder<EmployeeAccount> builder)
{
builder.ToTable("EmployeeAccounts");
builder.HasKey(x => new { x.EmployeeId, x.AccountId });
}
}