public async Task <IActionResult> PutForumDetail([FromRoute] int id, [FromBody] ForumDetail forumDetail) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != forumDetail.ForumDetailID) { return(BadRequest()); } _context.Entry(forumDetail).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ForumDetailExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPatient([FromRoute] int id, [FromBody] Patient patient) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != patient.PatientID) { return(BadRequest()); } _context.Entry(patient).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PatientExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGENumbering([FromRoute] int id, [FromBody] GENumbering gENumbering) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != gENumbering.GENumberingID) { return(BadRequest()); } _context.Entry(gENumbering).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GENumberingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }