public async Task <ActionResult> Get() { try { var results = await eventoAppService.ObterEventosAsync(); return(Ok(results)); } catch (System.Exception ex) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Banco de dados Falhou {ex.Message}")); } }
public async Task <IActionResult> ObterTodosEventossAsync() { return(Ok(await appService.ObterEventosAsync())); }