Files
Backend-Api/CompanyManagment.EFCore/Mapping/EmployeeDocumentsAdminSelectionMapping.cs
2025-02-18 16:16:33 +03:30

20 lines
725 B
C#

using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CompanyManagment.EFCore.Mapping
{
public class EmployeeDocumentsAdminSelectionMapping : IEntityTypeConfiguration<EmployeeDocumentsAdminSelection>
{
public void Configure(EntityTypeBuilder<EmployeeDocumentsAdminSelection> builder)
{
builder.ToTable("EmployeeDocumentsAdminSelection");
builder.HasKey(x => x.id);
builder.HasMany(x => x.SelectedEmployeeDocumentItems).WithOne(x => x.EmployeeDocumentsAdminSelection)
.HasForeignKey(x => x.EmployeeDocumentsAdminViewId);
}
}
}