Esempio n. 1
0
        /// <summary>Sets the result of the query deferred.</summary>
        /// <param name="reader">The reader returned from the query execution.</param>
        public override void SetResult(DbDataReader reader)
        {
            if (reader.GetType().FullName.Contains("Oracle"))
            {
                var reader2 = new QueryFutureOracleDbReader(reader);
                reader = reader2;
            }

            var enumerator = GetQueryEnumerator <T>(reader);

            SetResult(enumerator);
        }
Esempio n. 2
0
        /// <summary>Sets the result of the query deferred.</summary>
        /// <param name="reader">The reader returned from the query execution.</param>
        public override void SetResult(DbDataReader reader)
        {
            if (reader.GetType().FullName.Contains("Oracle"))
            {
                var reader2 = new QueryFutureOracleDbReader(reader);
                reader = reader2;
            }

            var enumerator = GetQueryEnumerator <TResult>(reader);

            // Enumerate on first item only
            enumerator.MoveNext();
            _result = enumerator.Current;

            HasValue = true;
        }