Exemple #1
0
        public ActionResult UpdateCart(DishIndexViewModel viewModel)
        {
            Cart cart = Cart.GetCart();

            cart.Update(viewModel.CartLines);
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public ActionResult Index()
        {
            Cart cart = Cart.GetCart();

            DishIndexViewModel viewModel = new DishIndexViewModel
            {
                Cart      = cart,
                CartLines = cart.GetCartLines(),
            };

            return(View(viewModel));
        }