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