public ActionResult UpdateCart(DishIndexViewModel viewModel) { Cart cart = Cart.GetCart(); cart.Update(viewModel.CartLines); return(RedirectToAction("Index")); }
public ActionResult Index() { Cart cart = Cart.GetCart(); DishIndexViewModel viewModel = new DishIndexViewModel { Cart = cart, CartLines = cart.GetCartLines(), }; return(View(viewModel)); }