/// <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()); } }
/// <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()); } }