public override OperationReturn <string> ValidateParameters() { OperationReturn <string> response = new OperationReturn <string>(); // Checks if csv file exists string csvFile = Parameters[0]; if (File.Exists(csvFile) == false) { response.MessageList.Add(new OperationInfo("02", $"Csv file doesn't exist at {csvFile}")); response.Success = false; return(response); } _productOrderItems = GetProductOrderItemsFromParameters(); // Checks if product identifier exists if (_productOrderItems.Any(x => _productItemRepository.GetProductItemById(x.ProductId) == null)) { response.MessageList.Add(new OperationInfo("03", "All products in the order must be present in the csv source file.")); } // Checks if the "quantity" parameter is valid if (_productOrderItems.Any(x => x.Quantity == 0 || x.Quantity < 0)) { response.MessageList.Add(new OperationInfo("04", "All products in the order must have a valid quantity.")); } response.Success = (response.MessageList.Count == 0); return(response); }