public async Task <IActionResult> PutPerson(int id, Person person) { if (id != person.ID) { return(BadRequest()); } _context.Entry(person).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }