public IActionResult Create(AddProgram model) { if (ModelState.IsValid) { var program = new Programs() { ProgramName = model.ProgramName }; var programId = programRepository.CreateProgram(program); if (programId > 0) { return RedirectToAction("Index", "Program"); } ModelState.AddModelError("", "System error, please try again later!"); } var programView = new AddProgram(); return View(programView); }