Exemplo n.º 1
0
 public IActionResult Get()
 {
     try
     {
         var result = docService.GetAll();
         if (result != null && result.Count > 0)
         {
             return(Ok(result));
         }
         else
         {
             return(NotFound());
         }
     }
     catch (Exception ex)
     {
         logger.LogError(ex.Message);
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }