public async Task <IActionResult> PutSeries(int id, Series series) { if (id != series.SeriesId) { return(BadRequest()); } _context.Entry(series).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SeriesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutESRB(int id, ESRB eSRB) { if (id != eSRB.ESRBId) { return(BadRequest()); } _context.Entry(eSRB).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ESRBExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDeveloper(int id, Developer developer) { if (id != developer.DeveloperId) { return(BadRequest()); } _context.Entry(developer).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DeveloperExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGenre(int id, Genre genre) { if (id != genre.Id) { return(BadRequest()); } _context.Entry(genre).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GenreExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }