public async Task <ActionResult <Atividade> > PutAtividade(int id, Atividade atividade) { if (id != atividade.Id) { return(BadRequest()); } _context.Entry(atividade).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AtividadeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Responsavel> > PutResponsavel(int id, Responsavel responsavel) { if (id != responsavel.Id) { return(BadRequest()); } _context.Entry(responsavel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ResponsavelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }