Ejemplo n.º 1
0
 public IActionResult Visit(long id)
 {
     try
     {
         Animal animal = _animalService.GetById(id);
         return(View(BuildAnimalListing(animal)));
     } catch (Exception ex)
     {
         ErrorViewModel error = new ErrorViewModel();
         error.Message = ex.Message;
         return(RedirectToAction("Error", "Home", error));
     }
 }