Пример #1
0
        public async Task <IActionResult> RemoveFromShoppingCart(int pizzaId)
        {
            var selectedPizza = await _pizzaRepo.GetByIdAsync(pizzaId);

            if (selectedPizza != null)
            {
                await _Cart.RemoveFromCartAsync(selectedPizza);
            }
            return(RedirectToAction("Index"));
        }