public ActionResult AboutMe() { if (Session["userid"] != null) { var userModel = new UsersViewModel(); var id = (int)Session["userid"]; userModel.LoadData(db.Users.Single(u => u.Id == id)); return(View("AboutMe", userModel)); } TempData["infMessage"] = "needAuthorize"; return(RedirectToAction("Index", "Home")); }
private void OnUsersViewLoaded(object sender, RoutedEventArgs routedEventArgs) { // Loaded -= OnUsersViewLoaded; _viewModel.LoadData(); }