public async Task <IActionResult> PutThermometerTestResult(int id, ThermometerTestResult thermometerTestResult) { if (id != thermometerTestResult.ThermometerTestResultId) { return(BadRequest()); } _context.Entry(thermometerTestResult).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ThermometerTestResultExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <ThermometerTestResult> > PostThermometerTestResult(ThermometerTestResult thermometerTestResult) { _context.ThermometerTestResults.Add(thermometerTestResult); await _context.SaveChangesAsync(); return(CreatedAtAction("GetThermometerTestResult", new { id = thermometerTestResult.ThermometerTestResultId }, thermometerTestResult)); }