You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
914 B
31 lines
914 B
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
|
|
|
|
namespace Microsoft.eShopWeb.Infrastructure.Data.Config
|
|
{
|
|
public class AddressConfiguration : IEntityTypeConfiguration<Address>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Address> 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();
|
|
}
|
|
}
|
|
}
|
|
|