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)); } }
public async Task <IActionResult> Get([FromRoute] int id) { var vm = await _areasService.GetById(id); return(Ok(vm)); }