예제 #1
0
 private void ProductQuantityInShoppingCartChangedEventHandler(ProductQuantityInShoppingCartChanged e)
 {
     ShoppingCartItem item = _items.Find(i => i.ProductId == e.ProductId);
     item.Quantity = e.NewQuantity;
 }
예제 #2
0
 public void ChangeProductQuanity(Guid productId, int newQuantity)
 {
     var e = new ProductQuantityInShoppingCartChanged(Id, productId, newQuantity);
     ApplyEvent(e);
 }