32 lines
742 B
C#
32 lines
742 B
C#
using Church.Net.Entity.Interface;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text;
|
|
|
|
namespace Church.Net.Entity
|
|
{
|
|
public class AddressInfo : IEntity
|
|
{
|
|
public AddressInfo()
|
|
{
|
|
Id = "new";
|
|
}
|
|
[Key]
|
|
public string Id { get; set; }
|
|
public string Address { get; set; }
|
|
public string City { get; set; }
|
|
public string State { get; set; }
|
|
public string Zip { get; set; }
|
|
|
|
public string GetCSZ()
|
|
{
|
|
string result = City;
|
|
|
|
string sz = $"{State} {Zip}".Trim();
|
|
|
|
return result + (string.IsNullOrWhiteSpace(sz) ? "" : $", {sz}");
|
|
}
|
|
}
|
|
}
|