/// <summary> /// Remove item from wish list. /// </summary> /// <param name="wishListId">The wish list identifier.</param> /// <param name="productIds">The items to remove from the wish list.</param> /// <returns>Returns the updated wish list.</returns> public virtual async Task <CommerceList> RemoveItemFromWishList(long wishListId, IEnumerable <long> productIds) { if (productIds == null) { throw new ArgumentNullException(nameof(productIds)); } ManagerFactory managerFactory = Utilities.GetManagerFactory(this.EcommerceContext); ICommerceListManager commerceListManager = managerFactory.GetManager <ICommerceListManager>(); ICustomerManager customerManager = managerFactory.GetManager <ICustomerManager>(); Customer customer = await customerManager.Read(string.Empty); Collection <CommerceListLine> wishListLines = new Collection <CommerceListLine>(); foreach (long productId in productIds) { CommerceListLine wishListLine = new CommerceListLine() { CommerceListId = wishListId, CustomerId = customer.AccountNumber, ProductId = productId }; wishListLines.Add(wishListLine); } CommerceList updatedWishList = await commerceListManager.RemoveLines(wishListId, wishListLines); return(updatedWishList); }