public IHttpActionResult ChangeQuantity([FromBody] SetQuantityModel model)
        {
            var cmd     = new SetProductQuantity(model.Id, model.Quantity);
            var product = _commandDispatcher.ExecuteCommand <ProductAggregate>(cmd);

            return(Ok(ProductModel.FromAggregate(product)));
        }
 public ActionResult SetQuantitiy(SetQuantityModel model)
 {
     try
     {
         var success = _productWebService.SetShoppingCartQuantityById(model.ShoppingCartItemId, model.Quantity);
         return(Json(new { Success = success }));
     }
     catch (Exception ex)
     {
         return(Json(new { Success = false, Message = ex.Message }));
     }
 }