public void DeleteMobileTestingProduct(int id) { var mobileTestingProduct = GetMobileTestingProduct(id); if (mobileTestingProduct is null) { throw new ArgumentException ($"MobileTestingProduct with id = {id} doesn't exist"); } if (mobileTestingProduct.CalibrationProduct != null) { _calibrationProductService.DeleteCalibrationProduct (mobileTestingProduct.CalibrationProduct.Id); } _mobileTestingProductRepository.DeleteMobileTestingProduct(id); }
public void DeleteCalibrationProduct(int id) { _calibrationProductService.DeleteCalibrationProduct(id); }