using Company.Domain.FinancialStatmentAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace CompanyManagment.EFCore.Mapping; public class FinancialStatmentMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("FinancialStatments"); builder.HasKey(x => x.id); builder.Property(x => x.ContractingPartyId); builder.Property(x => x.ContractingPartyName).HasMaxLength(100); builder.HasMany(x => x.FinancialTransactionList) .WithOne(x => x.FinancialStatment) .HasForeignKey(x => x.FinancialStatementId); } }