public ActionResult Edit(string id, Nse nse) { if (id != nse.Id) { return(NotFound()); } if (ModelState.IsValid) { nseService.Update(id, nse); return(RedirectToAction(nameof(Index))); } else { return(View(nse)); } /*try * { * // TODO: Add update logic here * * return RedirectToAction(nameof(Index)); * } * catch * { * return View(); * }*/ }
public ActionResult Edit(string id, Nse nse) { if (id != nse.Id) { return(NotFound()); } if (ModelState.IsValid) { _nseService.Update(id, nse); return(RedirectToAction(nameof(Index))); } else { return(View(nse)); } }