public async Task <IActionResult> Putalumnos(int id, alumnos alumnos) { if (id != alumnos.id_alumnos) { return(BadRequest()); } _context.Entry(alumnos).State = EntityState.Modified; try { await _context.SaveChangesAsync(); return(CreatedAtAction("Getalumnos", new { id = alumnos.id_alumnos }, alumnos)); } catch (DbUpdateConcurrencyException) { if (!alumnosExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Puttutores(int id, tutores tutores) { if (id != tutores.id_tutor) { return(BadRequest()); } _context.Entry(tutores).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!tutoresExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Putdirectiva(int id, directiva directiva) { if (id != directiva.id_directiva) { return(BadRequest()); } _context.Entry(directiva).State = EntityState.Modified; try { await _context.SaveChangesAsync(); return(CreatedAtAction("Getdirectiva", new { id = directiva.id_directiva }, directiva)); } catch (DbUpdateConcurrencyException) { if (!directivaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Putprofesores(int id, profesores profesores) { if (id != profesores.id_profesor) { return(BadRequest()); } _context.Entry(profesores).State = EntityState.Modified; try { await _context.SaveChangesAsync(); return(CreatedAtAction("Getprofesores", new { id = profesores.id_profesor }, profesores)); } catch (DbUpdateConcurrencyException) { if (!profesoresExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }