public ViewResult Index()
        {
            _shoppingCart.ShoppingCartItems = _shoppingCart.GetShoppingCartItems();

            var shoppingCartViewModel = new ShoppingCartViewModel
            {
                ShoppingCart      = _shoppingCart,
                ShoppingCartTotal = _shoppingCart.GetShoppingCartTotal()
            };

            return(View(shoppingCartViewModel));
        }
Пример #2
0
        public IActionResult Index()
        {
            var items = _shoppingCart.GetShoppinCartItems();

            _shoppingCart.ShoppinCartItems = items;

            var sCVM = new ShoppingCartViewModel
            {
                ShoppingCart      = _shoppingCart,
                ShoppingCartTotal = _shoppingCart.GetShoppingCartTotal()
            };

            return(View(sCVM));
        }
Пример #3
0
        public IViewComponentResult Invoke()
        {
            var items = _shoppingCart.GetShoppinCartItems();

            _shoppingCart.ShoppinCartItems = items;

            var shoppingCartViewModel = new ShoppingCartViewModel
            {
                ShoppingCart      = _shoppingCart,
                ShoppingCartTotal = _shoppingCart.GetShoppingCartTotal()
            };

            return(View(shoppingCartViewModel));
        }