public async Task <ActionResult <TransactionDeleteResponse> > Delete(Guid id) { TransactionDeleteArgs transactionDeleteArgs = new TransactionDeleteArgs { TransactionId = id }; IMediator mediator = Factory.Resolve <IMediator>(); TransactionDeleteResult transactionDeleteResult = await mediator.Send(new TransactionDeleteCommand(transactionDeleteArgs)); transactionDeleteResult.EnsureSuccess(); TransactionDeleteResponse response = new TransactionDeleteResponse { IsSuccess = true }; return(Ok(response)); }
public static Guid Delete(TransactionDeleteArgs args) { return(args.TransactionId); }
public TransactionDeleteCommand(TransactionDeleteArgs args) { Args = args; }