public void UpdateQuantityOnReceived(InventoryItemStocked @event) { Log(string.Format("updating inventory summary of item {0} ", @event.AggregateId)); //var aggregate = _repository.GetById<Sample.Domain.Inventory.Domain.InventoryItem>(@event.AggregateId); var qm = GetById<InventoryItemTotalQuantity>(@event.AggregateId); qm.TotalAvailabilityInAllStorages += @event.Quantity; Update(qm); }
public void UpdateQuantityOnReceived(InventoryItemStocked @event) { Log(string.Format("updating inventory summary of item {0} ", @event.AggregateId)); }
public void Apply(InventoryItemStocked @event) { Quantity += @event.Quantity; }