예제 #1
0
        public async Task Handle(ReduceProduct command)
        {
            var product = await _DomainRepository.GetByKeyAsync <Product>(command.ProductId)
                          .ConfigureAwait(false);

            product.ReduceCount(command.ReduceCount);
            await _UnitOfWork.CommitAsync()
            .ConfigureAwait(false);

            _CommandContext.Reply = product.Count;
        }