using Company.Domain.InsurancJobAgg; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace CompanyManagment.EFCore.Mapping; public class InsuranceJobMapping : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("InsuranceJobs"); builder.HasKey(x => x.id); builder.Property(x => x.InsuranceJobTitle).HasMaxLength(100); builder.Property(x => x.Year).HasMaxLength(4); builder.Property(x => x.EconomicCode).HasMaxLength(255); builder.HasMany(x => x.InsuranceJobItemList) .WithOne(x => x.InsuranceJob) .HasForeignKey(x => x.InsuranceJobId); } }