using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; namespace Microsoft.eShopWeb.Infrastructure.Data.Config { public class AddressConfiguration : IEntityTypeConfiguration
{ public void Configure(EntityTypeBuilder
builder) { builder.Property(a => a.ZipCode) .HasMaxLength(18) .IsRequired(); builder.Property(a => a.Street) .HasMaxLength(180) .IsRequired(); builder.Property(a => a.State) .HasMaxLength(60); builder.Property(a => a.Country) .HasMaxLength(90) .IsRequired(); builder.Property(a => a.City) .HasMaxLength(100) .IsRequired(); } } }