예제 #1
0
        public ActionResult RemoveFromCart(int cartId, int productId)
        {
            List <CartViewModel> cartViewModels = Session["CartItems"] as List <CartViewModel>;

            Session["CartItems"]   = cartServices.RemoveFromCart(cartViewModels, cartId, productId);
            Session["CartCounter"] = (Session["CartItems"] as List <CartViewModel>).Count;
            return(RedirectToAction("ShowCart"));
        }