public IActionResult Edit(College model) { var obj = new College(); try { if (ModelState.IsValid) { var result = _collegeService.UpdateCompany(model); TempData["SuccessMsg"] = "Data saved successfully"; } } catch (Exception ex) { TempData["ErrorMsg"] = ex.Message; return(View(obj)); } return(RedirectToAction("Index")); }