public async Task <IActionResult> PutCalibrator(int id, Calibrator calibrator) { if (id != calibrator.Id) { return(BadRequest()); } _context.Entry(calibrator).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CalibratorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutLot(int id, Lot lot) { if (id != lot.Id) { return(BadRequest()); } _context.Entry(lot).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LotExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }