public ActionResult DeleteUser(UserData User) { if (UserHelper.DeleteById(User.Id)) { return RedirectToAction("ListUsers"); } else { ModelState.AddModelError("", "Si è Verificato un Errore."); } return View(User); }
public ActionResult DeleteUser(Guid Id) { UserEntity User = UserHelper.GetById(Id); UserData result = new UserData { Id = User.Id, Email = User.Email, Username = User.Username, CreationDate = User.CreationDate, IsAdmin = User.IsAdmin, IsOnLine = User.IsOnLine, LastLoginDate = User.LastLoginDate }; return View(result); }