Ejemplo n.º 1
0
        public async Task Handle(DeleteInventoryItem command)
        {
            InventoryItemEvents iie = new InventoryItemEvents(_inventoryEventRepository, command.AggregateId);

            // ToDo: Cache aggregate and attempt to update rather than regenerate
            InventoryItemAggregate iia = (InventoryItemAggregate)await iie.ModelAsync();

            await Task.WhenAll(
                iie.AppendEventAsync((IModelEvent <Guid>)command)
                , _inventoryWriteRepository.DeleteAsync(command.AggregateId)
                );
        }
Ejemplo n.º 2
0
 public async Task DeleteAsync(Guid id)
 {
     await _writeRepository.DeleteAsync(id);
 }