public async Task <IActionResult> PutComposition(long id, Composition composition) { if (id != composition.Id) { return(BadRequest()); } _context.Entry(composition).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompositionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }