public async Task <IActionResult> Edit(int id, [Bind("IdexceptionLcr,Name,Description")] Exceptionlcr exceptionlcr) { if (id != exceptionlcr.IdexceptionLcr) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(exceptionlcr); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ExceptionlcrExists(exceptionlcr.IdexceptionLcr)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(exceptionlcr)); }
public async Task <IActionResult> Create([Bind("IdexceptionLcr,Name,Description")] Exceptionlcr exceptionlcr) { if (ModelState.IsValid) { _context.Add(exceptionlcr); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(exceptionlcr)); }