コード例 #1
0
 public async Task <HttpResponseMessage> Listar()
 {
     try
     {
         var response = _serviceUsuario.Listar();
         return(await ResponseAsync(response, _serviceUsuario));
     }
     catch (Exception ex)
     {
         return(await ResponseExceptionAsync(ex));
     }
 }
コード例 #2
0
        public async Task <IActionResult> Listar()
        {
            try
            {
                AtualizarUsuarioLogado();

                return(await ResponseAsync(_serviceUsuario.Listar(), _serviceUsuario));
            }
            catch (Exception e)
            {
                return(await ResponseExceptionAsync(e));
            }
        }
コード例 #3
0
 public Task <HttpResponseMessage> Listar()
 {
     return(CreateResponse(HttpStatusCode.OK, _serviceUsuario.Listar(), _serviceUsuario.GetNotifications()));
 }