public IActionResult AddCertificate(AddCertificateViewModel model) { if (ModelState.IsValid) { EmployeeCertificate newCertificate = new EmployeeCertificate { EmployeeId = model.EmployeeId, Name = model.Name, Provider = model.Provider, Date = model.Date, Notes = model.Notes }; _employeeRepository.AddEmpCertificate(newCertificate); var successMessage = "Certificate Info Updated Successfully. Name: " + newCertificate.EmployeeId; TempData["successAlert"] = successMessage; // return RedirectToAction(successMessage,""); return(PartialView("_PartialMessage")); } return(View()); }