public ActionResult AssignUsers(int id) { Project project = db.Projects.Find(id); ProjectAssignHelper helper = new ProjectAssignHelper(); var projectUser = new ProjectUserViewModel(); projectUser.Project = project; projectUser.Id = project.Id; projectUser.Name = project.Name; projectUser.Users = db.Users.ToList(); projectUser.SelectedUsers = helper.ListProjectUsers(projectUser.Id).Select(p => p.Id).ToArray(); projectUser.ProjectUsers = new MultiSelectList(db.Users, "Id", "LastName", projectUser.SelectedUsers); return(View(projectUser)); }