public ActionResult SetMeasurements(Guid id, [FromBody] IEnumerable <UpdateInspectionMeasurementRequest> measurementUpdates) { var inspectionItemInDb = _context.InspectionItems.SingleOrDefault(item => item.Id == id); if (inspectionItemInDb == null) { return(NotFound()); } return(InspectionService.UpdateInspectionItemMeasurements( _context, measurementUpdates) ? NoContent() : StatusCode(500)); }