// GET api/<controller> public string Get() { return(JsonConvert.SerializeObject( LocationHelper.GetAll().Select(item => new { id = item.ID, name = item.NameEN }), new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public async Task <IEnumerable <Location> > GetLocationAll() { var all = locHelp.GetAll(); return(await all); }