Esempio n. 1
0
        public IActionResult AddCartItem(UserAddToCartViewModel postModel)
        {
            var dboCart = new CartDBO();

            dboCart.Quantity  = postModel.Quantity;
            dboCart.CartId    = postModel.CartId;
            dboCart.ID        = postModel.ID;
            dboCart.ProductID = postModel.ProductID;
            dboCart.PurseName = postModel.PurseName;
            dboCart.Price     = postModel.Price;

            _CartRepository.InsertCartItem(dboCart);

            return(RedirectToAction(nameof(CartController.CartItems)));
        }
Esempio n. 2
0
        public IActionResult UserAddToCart()
        {
            var model = new UserAddToCartViewModel();

            return(View(model));
        }