public async Task <IActionResult> PutConta(long id, [FromBody] Conta conta) { if (id != conta.Id) { return(BadRequest()); } _context.Entry(conta).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMovimento(long id, Movimento movimento) { if (id != movimento.Id) { return(BadRequest()); } _context.Entry(movimento).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MovimentoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }