public ActionResult Edit(ContactViewModel contactViewModel) { try { var saveData = _contactsRepo.EditContact(contactViewModel); if (saveData.IsSuccessStatusCode) { return(RedirectToAction("Index")); } else { ViewBag.message = "Contacts record not update...!"; } return(RedirectToAction("Index")); } catch { return(View()); } }