示例#1
0
        /// <summary>
        /// Executes the reader.
        /// </summary>
        /// <param name="sqlQuery">The SQL query.</param>
        /// <param name="connection">The connection.</param>
        /// <returns></returns>
        public static SQLiteDataReader ExecuteReader(string sqlQuery, SQLiteConnection connection)
        {
            using (var command = new SQLiteCommand(sqlQuery, connection))
            {
                APILog.Debug(typeof(SQLiteQuery), "ExecuteReader", sqlQuery);

                return(command.ExecuteReader());
            }
        }
示例#2
0
        /// <summary>
        /// Executes the non query.
        /// </summary>
        /// <param name="sqlQuery">The SQL query.</param>
        /// <param name="connection">The connection.</param>
        /// <returns></returns>
        public static int ExecuteNonQuery(string sqlQuery, SQLiteConnection connection)
        {
            using (var command = new SQLiteCommand(sqlQuery, connection))
            {
                APILog.Debug(typeof(SQLiteQuery), "ExecuteNonQuery", sqlQuery);

                return(command.ExecuteNonQuery());
            }
        }