internal static List<ProductVariationImportModel> ConvertCsvDataToProductVariationImportModel(CsvData csvData, UploadConfig config)
        {
            List<ProductVariationImportModel> dataToInsertInDatabase = new List<ProductVariationImportModel>();
            foreach (var dataRow in csvData.Rows)
            {
                ProductVariationImportModel rowToInsert = new ProductVariationImportModel();
                rowToInsert.ProductNameSku = dataRow[0];
                rowToInsert.AttributeName = dataRow[1];
                rowToInsert.ValueName = dataRow[2];
                rowToInsert.Sku = dataRow[3];
                rowToInsert.AdditionalPrice = Convert.ToDecimal(dataRow[4]);
                rowToInsert.TrackInventory = GetTrackInventory(dataRow[5]);
                rowToInsert.InventoryAmount = GetSafeInt(dataRow[6]);
                rowToInsert.OutOfStockOption = GetOutOfStockOption(dataRow[7]);
                rowToInsert.IsActive = Convert.ToBoolean(dataRow[8]);

                rowToInsert.CorrespondingRowData = dataRow;

                dataToInsertInDatabase.Add(rowToInsert);
            }
            return dataToInsertInDatabase;
        }
        internal static List<ProductImportModel> ConvertCsvDataToProductImportModel(CsvData csvData, UploadConfig config)
        {
            List<ProductImportModel> dataToInsertInDatabase = new List<ProductImportModel>();
            foreach (var dataRow in csvData.Rows)
            {
                ProductImportModel rowToInsert = new ProductImportModel();
                rowToInsert.Title = dataRow[0];
                rowToInsert.ProductTypeTitle = dataRow[1];
                rowToInsert.Description = dataRow[2];
                rowToInsert.Url = dataRow[3];
                rowToInsert.Price = Convert.ToDecimal(dataRow[4]);
                rowToInsert.Weight = Convert.ToDecimal(dataRow[5]);
                rowToInsert.Sku = dataRow[6];

                rowToInsert.ImagesPath = dataRow[7].Split(config.MultipleItemsSeparator).ToList();
                rowToInsert.DocumentsAndFilesPath = dataRow[8].Split(config.MultipleItemsSeparator).ToList();
                rowToInsert.Departments = dataRow[9].Split(config.MultipleItemsSeparator).ToList();
                rowToInsert.Tags = dataRow[10].Split(config.MultipleItemsSeparator).ToList();

                rowToInsert.TrackInventory = GetTrackInventory(dataRow[11]);
                rowToInsert.InventoryAmount = GetSafeInt(dataRow[12]);
                rowToInsert.OutOfStockOption = GetOutOfStockOption(dataRow[13]);

                rowToInsert.IsActive = Convert.ToBoolean(dataRow[14]);

                rowToInsert.CustomFieldData = new List<CustomFieldData>();

                for (int i = 12; i < config.NumberOfColumns; i++)
                {
                    CustomFieldData customFieldData = new CustomFieldData { PropertyName = csvData.Header[i], PropertyValue = dataRow[i] };
                    rowToInsert.CustomFieldData.Add(customFieldData);
                }

                rowToInsert.CorrespondingRowData = dataRow;

                dataToInsertInDatabase.Add(rowToInsert);
            }
            return dataToInsertInDatabase;
        }