public async Task <IActionResult> Edit(int id, Partitura partitura) { if (id != partitura.Id) { return(NotFound()); } await _svc.update(id, partitura); return(Ok()); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Title,ReleaseDate,Genre,Time,Price")] Partitura partitura) { if (id != partitura.Id) { return(NotFound()); } if (!ModelState.IsValid) { return(View(partitura)); } await _svc.update(id, partitura); return(RedirectToAction(nameof(Index))); }