Example #1
0
        public IActionResult DeleteAccount(string password, string confpassword)
        {
            var username = GetUsername();

            Account account = new Account(username, password, confpassword);

            if (_accountLogic.DeleteAccount(account))
            {
                return(RedirectToAction("Index", "Home"));
            }

            ModelState.AddModelError(String.Empty, "De ingevoerde wachtwoorden zijn niet gelijk");
            return(Ok());
        }
 //Delete in CRUD
 public ActionResult Delete(int ID)
 {
     _accountLogic.DeleteAccount(ID);
     return(RedirectToAction("Index"));
 }