public void Handle(BillOfLadingConfirmed @event)
        {
            var bol = _repository.GetById<BillOfLading>(@event.BillOfLadingId);

            foreach (var detail in bol.Details)
            {
                var cmd = new StockIncomingItemCommand(Guid.NewGuid(), 
                    detail.ItemId,
                    detail.Sku, 
                    detail.Description, 
                    detail.Quantity,
                    IncomingGoodsStorage
                );
                
                _commandQueue.Enqueue(cmd);
            }
        }
Exemplo n.º 2
0
 private void Apply(BillOfLadingConfirmed evt)
 {
     this.Confirmed = true;
 }