public IActionResult DeleteCart() { int userId = Convert.ToInt32(User.Claims.FirstOrDefault(c => c.Type == "UserID")?.Value); _cartLogic.DeleteCart(userId); return(RedirectToAction("Cart", "Cart")); }
// DELETE: api/Cart/2 Delete public void Delete(int id) { CartLogic cl = new CartLogic(); cl.DeleteCart(id); }