Пример #1
0
        public IActionResult OnPost()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            restaurantData.AddItemToCart(ShoppingCart);

            restaurantData.Commit();
            return(RedirectToPage("./MenuItems", new { shoppingCartId = ShoppingCart.Id }));
        }