예제 #1
0
 public void AddItems(IEnumerable <ShoppingCartItem> shoppingCartItems, Stores.IEventStore eventStore)
 {
     foreach (var item in shoppingCartItems)
     {
         if (_items.Add(item))
         {
             eventStore.Raise("ShoppingCartItemAdded", new { UserId, item });
         }
     }
 }
예제 #2
0
 public void RemoveItems(int[] productCatalogueIds, Stores.IEventStore eventStore)
 {
     _items.RemoveWhere(i => productCatalogueIds.Contains(i.ProductCatalogId));
 }