public async Task <IActionResult> PutSolicitacao(long id, Solicitacao solicitacao) { if (id != solicitacao.Id) { return(BadRequest()); } _context.Entry(solicitacao).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SolicitacaoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPonto(long id, Ponto ponto) { if (id != ponto.Id) { return(BadRequest()); } _context.Entry(ponto).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PontoExists(id)) { return(NoContent()); } else { throw; } } return(NoContent()); }
public async Task <int> SaveChanges() { return(await _context.SaveChangesAsync()); }