Ejemplo n.º 1
0
 public IActionResult Get(int id)
 {
     try
     {
         return(Ok(getCountry.Execute(id)));
     }
     catch (EntityNotFoundException e)
     {
         return(NotFound(new
         {
             Errors = new List <string> {
                 e.Message
             }
         }));
     }
     catch (Exception e)
     {
         return(StatusCode(500, new
         {
             Errors = new List <string> {
                 e.Message
             }
         }));
     }
 }