17 lines
528 B
C#
17 lines
528 B
C#
using Company.Domain.InsuranceListAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CompanyManagment.EFCore.Mapping;
|
|
|
|
public class InsuranceListMapping : IEntityTypeConfiguration<InsuranceList>
|
|
{
|
|
public void Configure(EntityTypeBuilder<InsuranceList> builder)
|
|
{
|
|
builder.ToTable("InsuranceLists");
|
|
builder.HasKey(x => x.id);
|
|
|
|
builder.Property(x => x.Year).HasMaxLength(4);
|
|
builder.Property(x => x.Month).HasMaxLength(2);
|
|
}
|
|
} |