public IActionResult edit(FacultyDto facultyDto) { try { if (ModelState.IsValid) { _facultyService.update(facultyDto); AlertHelper.setMessage(this, "Faculty upated successfully."); return(RedirectToAction("index")); } } catch (Exception ex) { AlertHelper.setMessage(this, ex.Message, messageType.error); } return(View(facultyDto)); }