protected IDataReader ExecuteDataReader(SQLiteCommand command, SQLiteConnection connection, SQLiteTransaction transaction)
{
if (command == null)
throw new ArgumentNullException("command");
if (connection == null)
throw new ArgumentNullException("connection");
if (transaction != null && transaction.Connection != connection)
throw new ArgumentException("Transaction cannot be used with the passed connection.");
command.Connection = connection;
if (transaction != null)
{
command.Transaction = transaction;
}
try
{
return command.ExecuteReader();
}
catch (SQLiteException ex)
{
_log.Error("Unable to perform query.", ex);
throw new StorageException("Unable to perform query.", ex);
}
}