public ActionResult MyIndex(string badProj) { List <Project> myProjects = new List <Project>(); if (!string.IsNullOrEmpty(badProj)) { myProjects = projectHelper.ProjectsMissingRoles().ToList(); } else { var userId = User.Identity.GetUserId(); var currentUser = db.Users.Find(userId); myProjects = currentUser.Projects.ToList(); } return(View(myProjects)); }