public async Task <IActionResult> PutStudent_Class(int id, Student_Class student_Class) { if (id != student_Class.Id) { return(BadRequest()); } _context.Entry(student_Class).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Student_ClassExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMajor(int id, Major major) { if (id != major.Id) { return(BadRequest()); } _context.Entry(major).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MajorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }