public async Task <IActionResult> PutFilmText(short id, FilmText filmText) { if (id != filmText.FilmId) { return(BadRequest()); } _context.Entry(filmText).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FilmTextExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Edit(ushort id, Actor actor) { _context.Entry(actor).State = EntityState.Modified; _context.SaveChanges(); return(RedirectToAction("Index")); }