A class to parse defined parameters in sql statements automatically.
        // Public Methods (1)

        /// <summary>
        /// The data to render.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <IList <CellData> > Rows()
        {
            using (var sqlConnection = new SqlConnection(_connectionString))
            {
                using (var sqlCommand = new SqlCommand(_sql, sqlConnection)
                {
                    CommandTimeout = 1200
                })
                {
                    SqlParametersParser.ApplySafeParameters(sqlCommand, _sql, _paramValues);
                    sqlCommand.Connection.Open();

                    using (var sqlReader = sqlCommand.ExecuteReader())
                    {
                        while (sqlReader.Read())
                        {
                            var result = new List <CellData>();
                            for (var i = 0; i < sqlReader.FieldCount; i++)
                            {
                                var value       = sqlReader.GetValue(i);
                                var pdfCellData = new CellData
                                {
                                    PropertyName  = sqlReader.GetName(i),
                                    PropertyValue = value == DBNull.Value ? null : value,
                                    PropertyIndex = i,
                                    PropertyType  = sqlReader.GetFieldType(i)
                                };
                                result.Add(pdfCellData);
                            }
                            yield return(result);
                        }
                    }
                }
            }
        }
        // Public Methods (1) 

        /// <summary>
        /// The data to render.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <IList <CellData> > Rows()
        {
            if (!File.Exists(_filePath))
            {
                throw new FileNotFoundException(_filePath + " file not found.");
            }

            var connectionString = getConnectionString();

            using (var oleDbConnection = new OleDbConnection(connectionString))
            {
                using (var oleDbCommand = new OleDbCommand(_sql, oleDbConnection)
                {
                    CommandTimeout = 1200
                })
                {
                    SqlParametersParser.ApplySafeParameters(oleDbCommand, _sql, _paramValues);
                    oleDbCommand.Connection.Open();

                    using (var oleDbReader = oleDbCommand.ExecuteReader())
                    {
                        while (oleDbReader != null && oleDbReader.Read())
                        {
                            var result = new List <CellData>();
                            for (var i = 0; i < oleDbReader.FieldCount; i++)
                            {
                                var value       = oleDbReader.GetValue(i);
                                var pdfCellData = new CellData
                                {
                                    PropertyName  = oleDbReader.GetName(i),
                                    PropertyValue = (value == DBNull.Value) ? null : value,
                                    PropertyIndex = i
                                };
                                result.Add(pdfCellData);
                            }
                            oleDbReader.Close();
                            yield return(result);
                        }
                    }
                }
            }
        }
        // Public Methods (1) 

        /// <summary>
        /// The data to render.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <IList <CellData> > Rows()
        {
            var factory = DbProviderFactories.GetFactory(_providerName);

            using (var connection = factory.CreateConnection())
            {
                connection.ConnectionString = _connectionString;
                connection.Open();
                using (var command = connection.CreateCommand())
                {
                    command.CommandText = _sql;
                    command.CommandType = CommandType.Text;

                    SqlParametersParser.ApplySafeParameters(command, _sql, _paramValues);

                    using (var reader = command.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            var result = new List <CellData>();
                            for (var i = 0; i < reader.FieldCount; i++)
                            {
                                var value       = reader.GetValue(i);
                                var pdfCellData = new CellData
                                {
                                    PropertyName  = reader.GetName(i),
                                    PropertyValue = value == DBNull.Value ? null : value,
                                    PropertyIndex = i
                                };
                                result.Add(pdfCellData);
                            }
                            reader.Close();
                            yield return(result);
                        }
                    }
                }
            }
        }