예제 #1
0
 // GET api/<controller>
 public string Get()
 {
     return(JsonConvert.SerializeObject(
                LocationHelper.GetAllCityLocation().Select(item => new { id = item.ID, name = item.NameEN }),
                new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     }));
 }