public ActionResult showData() { string user = Request["user"]; database getData = new database(); List<StoryModel> result = getData.getStory(user); if (User.Identity.IsAuthenticated) return View("Index", result); else return View("NotLoggedIn"); }
public ActionResult Index() { database getData = new database(); string currentUser = User.Identity.Name; List<StoryModel> result = getData.getStory(currentUser); if (User.Identity.IsAuthenticated) return View("Index", result); else return View("NotLoggedIn"); }