src/Shared/EntityFramework/Core/Common/Utils/CommandHelper.cs
// <summary>
// Asynchronously consumes all rows and result sets from the reader. This allows client to retrieve
// parameter values and intercept any store exceptions.
// </summary>
Asynchronously consumes all rows and result sets from the reader. This allows client to retrieve
parameter values and intercept any store exceptions.
Asynchronously consumes all rows and result sets from the reader . This allows client to retrieve parameter values and intercept any store exceptions .
internal static async Task ConsumeReaderAsync(DbDataReader reader, CancellationToken cancellationToken)
        {
            if (null != reader
                && !reader.IsClosed)
            {
                cancellationToken.ThrowIfCancellationRequested();
                while (await reader.NextResultAsync(cancellationToken).WithCurrentCulture())
                {
                    cancellationToken.ThrowIfCancellationRequested();
                }
            }
        }
internal static async Task ConsumeReaderAsync ( DbDataReader reader , CancellationToken cancellationToken ) { if ( null != reader && ! reader . IsClosed ) { cancellationToken . ThrowIfCancellationRequested ( ) ; while ( await reader . NextResultAsync ( cancellationToken ) . WithCurrentCulture ( ) ) { cancellationToken . ThrowIfCancellationRequested ( ) ; } } }
Asynchronously consumes all rows and result sets from the reader.
Asynchronously consumes all rows and result sets from the reader .
// Note that we only walk through the result sets. We don't need // to walk through individual rows (though underlying provider // implementation may do so)
reader
DbDataReader
cancellationToken
CancellationToken