public ActionResult GetNotActive(int projectId, int firmId) { List <Employee> allFirmIdEmployees = (List <Employee>)employeeRepo.GetByFirmId(firmId); List <Employee> notActive = new List <Employee>(); Project project = projectRepo.GetById(projectId); ViewBag.ProjectId = projectId; ViewBag.FirmId = firmId; foreach (Employee emp in allFirmIdEmployees) { emp.Projects = (List <Project>)projectRepo.GetByEmployeeId(emp.Id); if (!emp.Projects.Contains(project)) { notActive.Add(emp); } } return(View(notActive)); }
public ActionResult EmployeeProjects(int employeeId) { var projects = projectRepo.GetByEmployeeId(employeeId); return(View(projects)); }