Esempio n. 1
0
        public IActionResult AddToWishList(ProductSpecificationViewModel viewModel, int productId)
        {
            var amount = viewModel.Product.Amount;
            int userId = Convert.ToInt32(User.Claims.FirstOrDefault(c => c.Type == "UserID")?.Value);

            _productLogic.AddToWishList(productId, userId, amount);
            return(RedirectToAction("Products", "Product"));
        }