public static Status ToEntity(this Contracts.Status status) { switch (status) { case Contracts.Status.Active: return(Status.Active); case Contracts.Status.Disabled: return(Status.Disabled); case Contracts.Status.Sold: return(Status.Sold); } throw new NotSupportedException(status + " is not supported"); }
public static string ToModel(this Contracts.Status status) { switch (status) { case Contracts.Status.Active: return("Active"); case Contracts.Status.Disabled: return("Disabled"); case Contracts.Status.Sold: return("Sold"); } throw new NotSupportedException(status + " is not supported"); }