public ActionResult List() { //CheckDeadline checks for those tasks whoes deadline is tommorow and add it in notification table if previously not added. tasksManagement.CheckDeadlines(User.Identity.GetUserId()); if (User.IsInRole("ProjectManager")) { return(View(db.Projects.OrderByDescending(p => p.CompletedPercentage).ToList())); } return(View(projectManagement.GetUsersProject(db.Users.Find(User.Identity.GetUserId())).OrderByDescending(p => p.CompletedPercentage))); }