public ActionResult AddDeveloperToProject(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var project = _projectLogic.GetProject(id.Value); var result = AutoMapper.Mapper.Map <List <Developer>, List <AddDeveloperViewModel> >(_developerLogic.GetAllDevelopers()); result.ForEach(n => n.ProjectId = project.ProjectId); return(View(result)); }
// GET: Developers public ActionResult Index() { var developers = _developerLogic.GetAllDevelopers(); return(View(AutoMapper.Mapper.Map <List <Developer>, List <DeveloperViewModel> >(developers))); }