public IActionResult RemoveAccount([FromBody] AccountDto account) { if (account != null) { _accountsService.Delete(account.AccountId); return(Ok()); } return(BadRequest()); }
/* 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()); } }
public async Task <ActionResult> Delete() { await _accountsService.Delete(_account.Id); return(Ok()); }
public IActionResult Delete(string userId, string accountId) { _userAccountService.Delete(userId, accountId); return(Ok()); }
public async Task Execute(string token, DeleteAccountCommand command) { _AccountService.Authenticate(token); await _AccountService.Delete(command); }
public IActionResult Delete(Account acc) { accountsService.Delete(acc); return(NoContent()); }