public async Task <IActionResult> Delete(int eventoId) { try { var evento = await eventoAppService.ObterEventoAsyncPorEventoId(eventoId, false); if (evento == null) { return(NotFound()); } eventoAppService.Delete(evento); if (await eventoAppService.SaveChangesAsync()) { return(Ok()); } } catch (System.Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Banco de dados Falhou!")); } return(BadRequest()); }