public ActionResult Create(ElectionKiosk ek) { try { // TODO: Add insert logic here int i = ekrepo.Create(ek); return(RedirectToAction(nameof(Index))); } catch (Exception ex) { throw new Exception(ex.Message); } }
public ActionResult Edit(ElectionKiosk ek) { try { // TODO: Add update logic here ekrepo.Update(ek); return(RedirectToAction(nameof(Index))); } catch (Exception ex) { return(View()); throw new Exception(ex.Message); } }