public async Task <IActionResult> OnPostAsync(int productId) { IShoppingCart cart = await _shoppingCartService.GetCartAsync(); await cart.AddProductByIdAsync(productId); return(RedirectToPage("/Cart/Index")); }