public async Task <ActionResult <AccountDeleteResponse> > Delete(Guid id) { AccountDeleteArgs accountDeleteArgs = new AccountDeleteArgs { AccountId = id }; IMediator mediator = Factory.Resolve <IMediator>(); AccountDeleteResult accountDeleteResult = await mediator.Send(new AccountDeleteCommand(accountDeleteArgs)); accountDeleteResult.EnsureSuccess(); AccountDeleteResponse response = new AccountDeleteResponse { IsSuccess = true }; return(Ok(response)); }
public AccountDeleteCommand(AccountDeleteArgs args) { Args = args; }
public static Guid Delete(AccountDeleteArgs args) { return(args.AccountId); }