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

14 lines
456 B
C#

using Company.Domain.EmployerAccountAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping;
public class EmployeerAccountMapping : IEntityTypeConfiguration<EmployerAccount>
{
public void Configure(EntityTypeBuilder<EmployerAccount> builder)
{
builder.ToTable("EmployerAccounts");
builder.HasKey(x => new { x.EmployerId, x.AccountId });
}
}