public async Task <IActionResult> Edit(int id, [Bind("Id,SuperheroName,AlterEgo,SuperpowerOne,SuperpowerTwo,CatchPhrase")] Superhero superhero) { if (id != superhero.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(superhero); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SuperheroExists(superhero.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(superhero)); }