Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
            public IQueryReader ExecuteReader(Query query)
            {
                var command = _connection.CreateCommand();

                command.Transaction = _transaction;

                var reader = new SQLiteQueryReader();

                reader.Execute(query, command, false);
                return(reader);
            }
Esempio n. 3
0
            public IQueryReader ExecuteReader(Query query)
            {
                var command = _connection.CreateCommand();
                command.Transaction = _transaction;

                var reader = new SQLiteQueryReader();
                reader.Execute(query, command, false);
                return reader;
            }
Esempio n. 4
0
        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;

            }
        }