public async Task <ActionResult <TransactionGetResponse> > Get(Guid id) { TransactionGetByIdArgs transactionGetByIdArgs = new TransactionGetByIdArgs { TransactionId = id }; IMediator mediator = Factory.Resolve <IMediator>(); TransactionGetByIdResult transactionGetByIdResult = await mediator.Send(new TransactionGetByIdCommand(transactionGetByIdArgs)); transactionGetByIdResult.EnsureSuccess(); if (transactionGetByIdResult.Result == null) { return(NoContent()); } TransactionGetResponse response = new TransactionGetResponse { Transaction = new TransactionView(transactionGetByIdResult.Result) }; return(Ok(response)); }
public TransactionGetByIdCommand(TransactionGetByIdArgs args) { Args = args; }