public async Task <IActionResult> GetById(int id)
 {
     try
     {
         return(Ok(await areasService.GetById(id)));
     }
     catch (FileNotFoundException ex)
     {
         return(BadRequest(ex));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
 }
예제 #2
0
        public async Task <IActionResult> Get([FromRoute] int id)
        {
            var vm = await _areasService.GetById(id);

            return(Ok(vm));
        }