public IActionResult GetAll() { try { var result = pagamentoRepository.Consultar(); return(Ok(result)); } catch (Exception e) { return(StatusCode(500, "Erro: " + e.Message)); } }