public async Task <IActionResult> PutTalent([FromRoute] int id, [FromBody] Talent talent) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != talent.TalentID) { return(BadRequest()); } _context.Entry(talent).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TalentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }