예제 #1
0
 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));
     }
 }
예제 #2
0
        // GET: Categoria/Details/XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXXXX
        public ActionResult Details(Guid codigo)
        {
            var categoria = _service.FindByCode(codigo);

            return(View(categoria));
        }