public ActionResult Edit(int idJenisTanah, string namaJenisTanah) { if ((bool)Session["Login"]) { try { MetaniContext context = new MetaniContext(); context.EditJenisTanah(idJenisTanah, namaJenisTanah); return(RedirectToAction("Index")); } catch { return(RedirectToAction("Create")); } } return(RedirectToAction("Login", "Admin")); }