public ActionResult ChangeMode(ChangeModeViewModel model) { var user = UserManager.FindById(User.Identity.GetUserId()); user.PrefferedMode = model.Mode; UserManager.Update(user); return(RedirectToAction("Index", new { Message = ManageMessageId.ChangeModeSuccess })); }
// // GET: /Manage/ChangeMode public ActionResult ChangeMode() { var user = UserManager.FindById(User.Identity.GetUserId()); var model = new ChangeModeViewModel { Mode = user.PrefferedMode }; return(View(model)); }