public ActionResult AddQuantity(InventoryViewModel inventoryViewModel) { int StoreID = (int)HttpContext.Session.GetInt32("StoreID"); int UserID = (int)HttpContext.Session.GetInt32("UserID"); try { //Decrease the quantity in Inventory and Update the product Order _buisnessLogicClass.SetQuantityForOrder(inventoryViewModel, StoreID, UserID); return(RedirectToAction(nameof(CreateCart))); } catch (Exception ex) { _logger.LogError(ex.Message); ModelState.AddModelError("Failure", ex.Message); return(RedirectToAction(nameof(CreateCart))); } }