public async Task <IActionResult> PutComplicationsModel([FromRoute] int id, [FromBody] ComplicationsModel complicationsModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != complicationsModel.Id) { return(BadRequest()); } _context.Entry(complicationsModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ComplicationsModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPatientProfile([FromRoute] int id, [FromBody] PatientProfile patientProfile) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != patientProfile.Recid) { return(BadRequest()); } _context.Entry(patientProfile).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PatientProfileExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutNeonatalOutcome([FromRoute] int id, [FromBody] NeonatalOutcome neonatalOutcome) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != neonatalOutcome.Id) { return(BadRequest()); } _context.Entry(neonatalOutcome).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NeonatalOutcomeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }