Exemplo n.º 1
0
        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;
 }
Exemplo n.º 3
0
 public static Guid Delete(AccountDeleteArgs args)
 {
     return(args.AccountId);
 }