public async Task <IActionResult> PutEpisode(int id, EpisodeModel episode) { if (id != episode.Id) { return(BadRequest()); } _context.Entry(episode).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EpisodeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutRoundModel(int id, RoundModel roundModel) { if (id != roundModel.Id) { return(BadRequest()); } _context.Entry(roundModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RoundModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }