public bool MoveNext() { if (_reader == null) { _enumerable._relationalQueryContext.Connection.Open(); using (var command = _enumerable._commandBuilder .Build( _enumerable._relationalQueryContext.Connection, _enumerable._relationalQueryContext.ParameterValues)) { _enumerable._logger.LogCommand(command); _reader = command.ExecuteReader(); } _enumerable._relationalQueryContext.RegisterDataReader(_reader); } var hasNext = _reader.Read(); Current = hasNext ? _enumerable._shaper(_reader) : default(T); return(hasNext); }
public bool MoveNext() { if (_reader == null) { _enumerable._connection.Open(); _command = _enumerable._commandBuilder.Build(_enumerable._connection); _enumerable._logger.WriteSql(_command.CommandText); _reader = _command.ExecuteReader(); } var hasNext = _reader.Read(); _current = hasNext ? _enumerable._shaper(_reader) : default(T); return(hasNext); }