public async Task <IActionResult> GetById(int id) { try { var evento = await _eventoService.GetEventosByIdAsync(id, true); if (evento == null) { return(NotFound("Nenhum evento por Id encontrado.")); } return(Ok(evento)); } catch (Exception ex) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Erro ao tentar recuperar eventos. Erro: {ex.Message}")); } }