Exemplo n.º 1
0
 public ActionResult <List <UserDTO> > GetAllUsers()
 {
     try
     {
         List <UserDTO> usersDTO = serviceClient.GetAllUsers();
         return(usersDTO);
     }
     catch (AggregateException ax)
     {
         var err = "";
         foreach (var errInner in ax.InnerExceptions)
         {
             err = errInner.Message;
         }
         return(BadRequest(err));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }