Beispiel #1
0
        public async Task <IActionResult> ConfirmDelete(string id)
        {
            await _adminUsersService.DeleteUser(id);

            TempData[AdminConstants.MessageType] = AdminConstants.Success;
            TempData[AdminConstants.Message]     = AdminConstants.SuccessfullyDeleteUser;

            return(RedirectToAction(nameof(Index)));
        }
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         aus.DeleteUser(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }