public async Task <Product_sizes> GetProduct_SizesByProductSizeAsync (int productId, int sizeId) { String request = "api/Product_Sizes/GetProduct_Size/" + productId + "/" + sizeId; Product_sizes productSize = await this.CallApi <Product_sizes>(request); return(productSize); }
public async Task <IActionResult> Index(int?product_removed, int?size_removed) { if (product_removed != null && size_removed != null) { this.cachingService.RemoveCartCache((int)product_removed, (int)size_removed); } List <Cart> cart = new List <Cart>(); cart = this.cachingService.GetCartCache(); List <Cart_Complete> cartComplete = new List <Cart_Complete>(); foreach (Cart c in cart) { Product_sizes size = await this.service.GetProduct_SizesByProductSizeAsync(c.Product_id, c.Size_id); cartComplete.Add(new Cart_Complete(await this.service.GetProductCompleteAsync(c.Product_id), size, c.Amount)); } return(View(cartComplete)); }