コード例 #1
0
        public async Task Handle(AddOrderCommand command)
        {
            var itemMap = _mapper.Map <OrderDTO, Domain.Model.Order>(command.OrderDTO);
            await _appService.Add(itemMap);

            _bus.EnQueue <OrderAddedEvent>(new OrderAddedEvent {
                OrderDTO = command.OrderDTO
            }, OrderAddedEvent.EventQueueName);
        }