private IEnumerable <string> GetStrings() { yield return($"{nameof(Ethnicity).ToLower()}={ethnicity.ToString().ToLower()}"); yield return($"{nameof(Gender).ToLower()}={gender.ToString().ToLower()}"); yield return($"{nameof(Age).ToLower()}={age.ToString().ToLower().Replace("_", "-")}"); }
public JsonNetResult Name(int id) { Ethnicity ethnicity = this.personTasks.GetEthnicity(id); if (ethnicity != null) { return(JsonNet(new { Id = id, Name = ethnicity.ToString() })); } else { return(JsonNet(string.Empty)); } }