public async Task <IActionResult> PutRecordLabel(int id, RecordLabel recordLabel) { if (id != recordLabel.RecordLabelId) { return(BadRequest()); } _context.Entry(recordLabel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RecordLabelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSong(int id, Song song) { if (id != song.SongId) { return(BadRequest()); } _context.Entry(song).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SongExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }