public async Task <IActionResult> PutContact(long id, Contact contact) { if (id != contact.Id) { return(BadRequest()); } try { int data = await _context.UpdateContact(id, contact); } catch (DbUpdateConcurrencyException) { if (!await _context.VerifyContact(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }