public ActionResult Edit(EditEmplVM model) { if (!ModelState.IsValid) { model.Departments = GetDepartmentsSelectListItems(); return(View(model)); } Employee edit = new Employee { Id = model.EmployeeId, FirstName = model.FirstName, LastName = model.LastName, PhoneNum = model.PhoneNum, DepartmentId = model.DeptId }; EmplRepoStub.EditEmployee(edit); return(RedirectToAction("List")); }