public async Task <IActionResult> Get() { try { var eventos = await _eventoService.GetAllEventoAsync(true); if (eventos == null) { return(NotFound("Nenhum evento encontrado.")); } return(Ok(eventos)); } catch (Exception ex) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Erro ao tentar recuperar eventos. Erro: {ex.Message}")); } }
public async Task <IEnumerable <Evento> > GetAllEventoAsync(bool includePalestrantes = false) { return(await _eventoService.GetAllEventoAsync(includePalestrantes)); }