public ActionResult ChangeState(string userName, string state) { bool locked = !state.Equals("0"); var user = Logic.Find(u => u.UserName == userName); user.LockoutEnabled = locked; Logic.Edit(user); return(RedirectToAction("Index")); }