public IActionResult AnadirArticulo(int IDUsuario, int IDArticulo, int?Cantidad, int?IDUnidadManipulacion, Boolean EnProcesar) { ObjectResult result; try { var ad = new AdaptadorAtc(_configuration); _carrito = ad.CarritosUsuariosAnadirArticulo(IDUsuario, IDArticulo, Cantidad, IDUnidadManipulacion, EnProcesar); result = new ObjectResult(_carrito) { 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); }