Setting attributees to required

- This is because they currently do not allow nulls and we don't want to lose that
This commit is contained in:
Eric Fleming
2019-05-31 21:47:17 -04:00
parent aaac128e7d
commit 9ba78f5187

View File

@@ -37,6 +37,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
private void ConfigureBasketItem(EntityTypeBuilder<BasketItem> builder)
{
builder.Property(bi => bi.UnitPrice)
.IsRequired(true)
.HasColumnType("decimal(18,2)");
}
@@ -148,6 +149,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
builder.OwnsOne(i => i.ItemOrdered);
builder.Property(oi => oi.UnitPrice)
.IsRequired(true)
.HasColumnType("decimal(18,2)");
}
}