Exemplo n.º 1
0
        public ActionResult UpdateCart(DishIndexViewModel viewModel)
        {
            Cart cart = Cart.GetCart();

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

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

            return(View(viewModel));
        }