示例#1
0
        public async Task <bool> Handle(AssingPaymentDetailCommand request, CancellationToken cancellationToken)
        {
            await UpdateAsync(Guid.Parse(request.PaymentTransactionStateId), async payment =>
            {
                payment.SomeNotNull()
                .Match(p => PaymentTransaction.AssignDetail(p, request.Description)
                       , () => throw new AggregateNotFoundException());
            });

            return(await Task.FromResult(true));
        }