public async Task <IActionResult> PutLabel(int id, Label label) { if (id != label.Id) { return(BadRequest()); } _context.Entry(label).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LabelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }