public async Task <IActionResult> PutMovies(int id, Movies movies) { if (id != movies.id) { return(BadRequest()); } _context.Entry(movies).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MoviesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutStudio(string id, Studio studio) { if (id != studio.Name) { return(BadRequest()); } _context.Entry(studio).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StudioExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }