Example #1
0
        public void Add(int productId, int quantity = 1)
        {
            var item = Items.SingleOrDefault(x => x.ProductId == productId);

            if (item == null) {
                item = new ShoppingCartItem(productId, quantity);
                ItemsInternal.Add(item);
            }
            else {
                item.Quantity += quantity;
            }
        }
Example #2
0
 public WishListItemPart(int wishListId, ShoppingCartItem item)
 {
     WishListId = WishListId;
     _item      = item;
 }