public async Task <IActionResult> GetCompraList(IEnumerable <long> idList) { try { var response = await service.GetCompraList(idList); if (response.erros != null) { return(Ok(new { compras = response.objValue, response.erros })); } return(Ok(new { compras = response.objValue })); } catch (Exception e) { var err = e.Message; return(BadRequest(new { msg = err })); } }