//LoginViewModel model) public ActionResult Index() { NewsFeedViewModel nfViewModel = new NewsFeedViewModel(); if (Session["Valid"] != null && (bool)Session["Valid"]) { //Session["NewsFeedPopulated"] = true; nfViewModel.PopulateNewsFeed(); return View("Index", nfViewModel); } else return Redirect("~/Account/Login"); }
public ActionResult NewsFeed(NewsFeedViewModel nfViewModel) { string status = nfViewModel.CommentToAdd.AddComment(); ViewData["StatusMessage"] = status; nfViewModel.PopulateNewsFeed(); return View("Index", nfViewModel); }
public ActionResult NewsFeed() { NewsFeedViewModel nfViewModel = new NewsFeedViewModel(); nfViewModel.PopulateNewsFeed(); return View("Index", nfViewModel); }