public IActionResult OnPostRemove(long productId, string returnUrl) { Cart.RemoveLine(Cart.Lines.First(cl => cl.Product.ProductID == productId).Product); return(RedirectToPage(new { returnUrl = returnUrl })); }
public CartModel(IStoreRepository repo, Cart cartService) { repository = repo; Cart = cartService; }