예제 #1
0
        public IActionResult RemoveAccount([FromBody] AccountDto account)
        {
            if (account != null)
            {
                _accountsService.Delete(account.AccountId);
                return(Ok());
            }

            return(BadRequest());
        }
예제 #2
0
        /*  public ActionResult Edit(int id, AccountsBlocked a)
         * {
         *    if (ModelState.IsValid)
         *    {
         *        acse.Update(a);
         *        acse.Commit();
         *        return RedirectToAction("Index");
         *    }
         *    else
         *    {
         *        return View();
         *    }
         * }
         *
         * public ActionResult Edit(int id, AccountsSaving a)
         * {
         *    if (ModelState.IsValid)
         *    {
         *        acse.Update(a);
         *        acse.Commit();
         *        return RedirectToAction("Index");
         *    }
         *    else
         *    {
         *        return View();
         *    }
         * }*/

        // GET: AccountBank/Delete/5
        public ActionResult Delete(int id)
        {
            if (ModelState.IsValid)
            {
                Accounts account = acse.GetById(id);
                acse.Delete(account);
                acse.Commit();
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
예제 #3
0
        public async Task <ActionResult> Delete()
        {
            await _accountsService.Delete(_account.Id);

            return(Ok());
        }
예제 #4
0
 public IActionResult Delete(string userId, string accountId)
 {
     _userAccountService.Delete(userId, accountId);
     return(Ok());
 }
예제 #5
0
 public async Task Execute(string token, DeleteAccountCommand command)
 {
     _AccountService.Authenticate(token);
     await _AccountService.Delete(command);
 }
예제 #6
0
 public IActionResult Delete(Account acc)
 {
     accountsService.Delete(acc);
     return(NoContent());
 }