public async Task <IActionResult> Get(int CartID) { if (!ModelState.IsValid) { return(Response(new ResultResponse("Parâmetros inválidos"))); } IResultResponse <IList <CartResponse> > carts = await _appService.Get(CartID); return(Response(null)); }
public ActionResult RemoveFromCart(int id) { // Remove the item from the cart var cart = ShoppingCart.GetCart(HttpContext); // Get the name of the album to display confirmation var albumName = _cartAppService.Get(id).Album.Title; // Remove from cart var itemCount = cart.RemoveFromCart(id); // Display the confirmation message var results = new ShoppingCartRemoveViewModel { Message = Server.HtmlEncode(albumName) + " has been removed from your shopping cart.", CartTotal = cart.GetTotal(), CartCount = cart.GetCount(), ItemCount = itemCount, DeleteId = id }; return(Json(results)); }
public ActionResult <CartDto> Get(int id) { return(_cartAppService.Get(id)); }
public async Task <IActionResult> Index() { var response = await _cartAppService.Get(); return(PartialView(response)); }