public async Task <IActionResult> Edit(int id, [Bind("Id,EventId,LogLevel,Message,CreatedTime")] EventLog eventLog) { if (id != eventLog.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(eventLog); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EventLogExists(eventLog.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(eventLog)); }