public IQueryReader ExecuteReader(Query query) { if (IsTransactionActive) { return(_currentTransaction.ExecuteReader(query)); } else { var con = OpenConnection(); var cmd = con.CreateCommand(); var reader = new SQLiteQueryReader(); try { reader.Execute(query, cmd, true); } catch { cmd.Dispose(); con.Dispose(); throw; } return(reader); } }
public IQueryReader ExecuteReader(Query query) { var command = _connection.CreateCommand(); command.Transaction = _transaction; var reader = new SQLiteQueryReader(); reader.Execute(query, command, false); return(reader); }
public IQueryReader ExecuteReader(Query query) { var command = _connection.CreateCommand(); command.Transaction = _transaction; var reader = new SQLiteQueryReader(); reader.Execute(query, command, false); return reader; }
public IQueryReader ExecuteReader(Query query) { if (IsTransactionActive) { return _currentTransaction.ExecuteReader(query); } else { var con = OpenConnection(); var cmd = con.CreateCommand(); var reader = new SQLiteQueryReader(); try { reader.Execute(query, cmd, true); } catch { cmd.Dispose(); con.Dispose(); throw; } return reader; } }