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)); }