// GET: EmployeeJobInfoController public ActionResult Index() { var empJobInfo = _repo.FindAll().ToList(); var model = _mapper.Map <List <EmployeeJobInfo>, List <EmployeeJobInfoVM> >(empJobInfo); return(View(model)); }
// GET: EmployeeWagesController public ActionResult Index() { var empJobInfo = _empjobinforepo.FindAll().ToList(); var mappedEmployeeJobInfo = _mapper.Map <List <EmployeeJobInfo>, List <EmployeeJobInfoVM> >(empJobInfo); //Loading the model to be a list of EmployeeJobInfo var model = new CreateEmployeeWagesVM { EmployeeJobInfos = mappedEmployeeJobInfo, NumberUpdated = 0 }; return(View(model)); }