Example #1
0
        /// <summary>
        /// Execute the sql string to the RDBMS
        /// </summary>
        /// <param name="query">The query string</param>
        /// <returns>The contex containing the IDataReader</returns>
        public IDataReaderContext Execute(CompiledQuery query)
        {
            var connection = _dbConnection.Conect();

            connection.Open();

            var command = connection.CreateCommand();

            command.CommandText = query.Query;
            command.Connection  = connection;

            return(new DataReaderContext(command.ExecuteReader(), connection, command));
        }