public async Task <IActionResult> Edit(string id, [Bind("Id,Content")] Comments comment) { if (id != comment.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(comment); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CommentExists(comment.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(comment)); }