public ActionResult NewFaculty(NewFacultyViewModel model) { try { if (ModelState.IsValid) { _adminBusinessLogic.CreateNewFaculty(model); ViewData.Add("LastActionResult", "Faculty created"); return(RedirectToActionPermanent("Faculties")); } return(View(model)); } catch (Exception e) { return(Json(new { result = "ERROR", message = e.Message }, JsonRequestBehavior.AllowGet)); } }