public async Task <IActionResult> PutVideoGames(int id, VideoGames videoGames) { if (id != videoGames.VideoGameId) { return(BadRequest()); } _context.Entry(videoGames).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VideoGamesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPublishers(int id, Publishers publishers) { if (id != publishers.PublisherId) { return(BadRequest()); } _context.Entry(publishers).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PublishersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }