14 lines
455 B
C#
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 });
|
|
}
|
|
} |