public void Update(MovieStudio newMovieStudio) { _context.Entry(newMovieStudio).State = EntityState.Modified; _context.Update(newMovieStudio); _context.SaveChanges(); }
public async Task <IActionResult> PutReview(int id, Review review) { if (id != review.Id) { return(BadRequest()); } _context.Entry(review).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReviewExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutStudio(int id, Studio studio) { if (id != studio.Id) { return(BadRequest()); } _context.Entry(studio).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StudioExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void Update(Movie movie) { _context.Entry(movie).State = EntityState.Modified; _context.SaveChanges(); }
public void Update(MovieTrivia movieTrivia) { _context.Entry(movieTrivia).State = EntityState.Modified; _context.Update(movieTrivia); _context.SaveChanges(); }