public async Task <IActionResult> PutPlatform(int id, Platform platform) { if (id != platform.Id) { return(BadRequest()); } _context.Entry(platform).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlatformExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutShow(int id, Show show) { if (id != show.Id) { return(BadRequest()); } _context.Entry(show).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShowExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }