示例#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 }));
 }
示例#2
0
 public CartModel(IStoreRepository repo, Cart cartService)
 {
     repository = repo;
     Cart       = cartService;
 }