public async Task <IActionResult> PutNumbersHoursDay(int id, NumbersHoursDay numbersHoursDay) { if (id != numbersHoursDay.Id) { return(BadRequest()); } _context.Entry(numbersHoursDay).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NumbersHoursDayExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSubject(int id, Subject subject) { if (id != subject.Id) { return(BadRequest()); } _context.Entry(subject).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SubjectExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutClassroom(int id, Classroom classroom) { if (id != classroom.Id) { return(BadRequest()); } _context.Entry(classroom).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClassroomExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGrade(int id, Grade grade) { if (id != grade.Id) { return(BadRequest()); } _context.Entry(grade).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GradeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTeacher(int id, Teacher teacher) { if (id != teacher.Id) { return(BadRequest()); } _context.Entry(teacher).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TeacherExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }