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