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