public IActionResult Find(Guid codigo) { try { return(Ok(_service.FindByCode(codigo))); } catch (ArgumentException ex) { return(NotFound(new Error(ex))); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }
// GET: Categoria/Details/XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXXXX public ActionResult Details(Guid codigo) { var categoria = _service.FindByCode(codigo); return(View(categoria)); }