Initial commit
This commit is contained in:
33
PartSource.Data/Models/PostalCode.cs
Normal file
33
PartSource.Data/Models/PostalCode.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PartSource.Data.Models
|
||||
{
|
||||
public class PostalCode
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(3)]
|
||||
public string ForwardSortationArea { get; set; }
|
||||
|
||||
[Required]
|
||||
public string City { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Province { get; set; }
|
||||
|
||||
//[Required]
|
||||
//public DbGeography Location { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string LocalDeliveryUnit { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Code
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("{0} {1}", (object) this.ForwardSortationArea, (object) this.LocalDeliveryUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user