9.3.1 Extending the Domain Model; Listing 9-8 The Contents of the ShippingDetails.cs File
parent
4027f863cc
commit
35419556fe
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SportsStore.Domain.Entities
|
||||
{
|
||||
public class ShippingDetails
|
||||
{
|
||||
[Required(ErrorMessage = "Please enter a name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please enter the first address line")]
|
||||
public string Line1 { get; set; }
|
||||
public string Line2 { get; set; }
|
||||
public string Line3 { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please enter a city name")]
|
||||
public string City { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please enter a state name")]
|
||||
public string State { get; set; }
|
||||
|
||||
public string Zip { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please enter a country name")]
|
||||
public string Country { get; set; }
|
||||
|
||||
public bool GiftWrap { get; set; }
|
||||
}
|
||||
}
|
|
@ -77,6 +77,7 @@
|
|||
<Compile Include="Concrete\EFProductRepository.cs" />
|
||||
<Compile Include="Entities\Cart.cs" />
|
||||
<Compile Include="Entities\Product.cs" />
|
||||
<Compile Include="Entities\ShippingDetails.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue