title: What is the fastest way to read data from a DbDataReader?
body: <p>In the following code, command is a DbCommand that has already been set up:</p>
  
  <pre><code>using( var dataReader = command.ExecuteReader() /*The actual execution of the query takes relatively little time.*/ ) {
                  while( dataReader.Read() ) {
                      // These are what take all of the time. Replacing them all with reader.GetValues( myArray ) has no impact.
                      val0 = dataReader.GetValue( 0 );
                      val1 = dataReader.GetValue( 1 );
                      val2 = dataReader.GetValue( 2 );
                  }
              }
  </code></pre>
  
  <p>The bulk of the time for the query I am currently working with is spent doing the GetValue calls. Is it making a round trip to the database for each GetValue call? It seems like it is, and this seems very inefficient. As the code notes, attempting to do it in one shot using GetValues() does not make a difference. Is there a way to get the entire row in one shot? Better yet, is there a way to get the entire result set in one shot?</p>
  
  <p>Thanks.</p>