示例#1
0
        public void DeleteCalibrationProduct(int id)
        {
            var сalibrationProduct = GetCalibrationProduct(id);

            if (сalibrationProduct is null)
            {
                throw new ArgumentException
                          ($"CalibrationProduct with id = {id} doesn't exist");
            }

            if (сalibrationProduct.StationaryTestingProduct != null)
            {
                _stationaryTestingProductService.DeleteStationaryTestingProduct
                    (сalibrationProduct.StationaryTestingProduct.Id);
            }

            _calibrationProductRepository.DeleteCalibrationProduct(id);
        }
 public void DeleteStationaryTestingProduct(int id)
 {
     _stationaryTestingProductService.DeleteStationaryTestingProduct(id);
 }