/// <summary> /// Deletes the wish list. /// </summary> /// <param name="wishListId">The wish list identifier.</param> /// <returns>Returns task.</returns> public virtual async Task DeleteWishList(long wishListId) { ManagerFactory managerFactory = Utilities.GetManagerFactory(this.EcommerceContext); ICommerceListManager commerceListManager = managerFactory.GetManager <ICommerceListManager>(); CommerceList wishList = await commerceListManager.Read(wishListId); await commerceListManager.Delete(wishList); }
/// <summary> /// Gets the wish list. /// </summary> /// <param name="wishListId">The wish list identifier.</param> /// <returns> /// The wish list. /// </returns> /// <exception cref="System.ArgumentNullException"> /// Throws when WishListId is null. /// </exception> public async virtual Task <CommerceList> GetWishList(long wishListId) { ManagerFactory managerFactory = Utilities.GetManagerFactory(this.EcommerceContext); ICommerceListManager commerceListManager = managerFactory.GetManager <ICommerceListManager>(); CommerceList wishList = await commerceListManager.Read(wishListId); return(wishList); }