// GET: Projects/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Project project = db.Projects.Find(id); if (project == null) { return(HttpNotFound()); } var allProjectManagers = roleHelper.UsersInRole("ProjectManager"); var currentProjectManagers = projectHelper.UsersInRoleOnProject(project.Id, "ProjectManager"); ViewBag.ProjectManagers = new MultiSelectList(allProjectManagers, "Id", "Email", currentProjectManagers); var allSubmitters = roleHelper.UsersInRole("Submitter"); var currentSubmitters = projectHelper.UsersInRoleOnProject(project.Id, "Submitter"); ViewBag.Submitters = new MultiSelectList(allSubmitters, "Id", "Email", currentSubmitters); var allDevelopers = roleHelper.UsersInRole("Developer"); var currentDevelopers = projectHelper.UsersInRoleOnProject(project.Id, "Developer"); ViewBag.Developers = new MultiSelectList(allDevelopers, "Id", "Email", currentDevelopers); return(View(project)); }