public async Task <IActionResult> Edit(int id, [Bind("Id,Title,Artist,Price,Genre")] Track track) { if (id != track.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(track); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TrackExists(track.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(track)); }