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