public async void UpdateProductInCart(Product product, int newQuantity) { BasketItem basketItem = await PetShopDatabase.GetProductFromCart(product.Id); basketItem.Quantity = newQuantity; PetShopDatabase.UpdateInCart(basketItem); }
public async void RemoveProductFromCart(Product product) { BasketItem basketItem = await PetShopDatabase.GetProductFromCart(product.Id); PetShopDatabase.RemoveFromCart(basketItem); }