public IActionResult AddProject(AddProjectViewModel project) { if (ModelState.IsValid) { EmployeeProject newEmployee = new EmployeeProject { EmployeeId = project.EmployeeId, Name = project.Name, Start = project.Start, Finish = project.Finish, Completed = project.Completed, JobPosition = project.JobPosition, ProjectId = project.ProjectId, Notes = project.Notes }; _employeeRepository.AddEmpProject(newEmployee); var successMessage = "Project Info Created Successfully. Name: " + newEmployee.EmployeeId; TempData["successAlert"] = successMessage; // return RedirectToAction(successMessage, ""); return(PartialView("_PartialMessage")); } return(View()); }