public ActionResult Create(Employee employee) { if (ModelState.IsValid) { var result = EmpContext.SaveEmployee(employee); return(RedirectToAction("Details", new { id = result })); } // Go to home page after a post has been created return(RedirectToAction("Index", "Home")); }