public async Task <IActionResult> Edit(int id, [Bind("id,object_name,duration_h,result,dateTime")] AnalisReport analisReport) { if (id != analisReport.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(analisReport); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AnalisReportExists(analisReport.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(analisReport)); }
public async Task <IActionResult> Edit(int id, [Bind("id,project_name,error_text,dateTime")] UserException userException) { if (id != userException.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userException); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExceptionExists(userException.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userException)); }