20 lines
725 B
C#
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);
|
|
}
|
|
}
|
|
}
|