コード例 #1
0
 // 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()
     }));
 }
コード例 #2
0
        public async Task <IEnumerable <Location> > GetLocationAll()
        {
            var all = locHelp.GetAll();

            return(await all);
        }