public IActionResult PedidosLeer(int idCliente, int pagina, int bloque, string nFactura, DateTime?fechaDesde, DateTime?fechaHasta) { ObjectResult result; var ad = new AdaptadorAtc(_configuration); try { //var res = new LecturasViewModel(_configuration, bs); var res = ad.PedidosLeer(idCliente, pagina, bloque, nFactura, fechaDesde, fechaHasta); result = new ObjectResult(res) { StatusCode = (int)HttpStatusCode.OK }; } catch (Exception ex) { result = new ObjectResult(ex) { StatusCode = (int)HttpStatusCode.Conflict }; Request.HttpContext.Response.Headers.Add("dsError", ex.Message); } return(result); }