src/Shared/EntityFramework/Infrastructure/IDbAsyncEnumerableExtensions.cs
// <summary>
// Asynchronously creates a <see cref="Dictionary{TKey, TSource}" /> from an <see cref="IDbAsyncEnumerable{TSource}" />
// by enumerating it asynchronously according to a specified key selector function.
// </summary>
// <typeparam name="TSource">
// The type of the elements of <paramref name="source" /> .
// </typeparam>
// <typeparam name="TKey">
// The type of the key returned by <paramref name="keySelector" /> .
// </typeparam>
// <param name="keySelector"> A function to extract a key from each element. </param>
// <param name="cancellationToken"> The token to monitor for cancellation requests. </param>
// <returns>
// A <see cref="Task" /> containing a <see cref="Dictionary{TKey, TSource}" /> that contains selected keys and values.
// </returns>
Asynchronously creates a  from an
by enumerating it asynchronously according to a specified key selector function.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        internal static Task<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>(
            this IDbAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, CancellationToken cancellationToken)
        {
            DebugCheck.NotNull(source);
            DebugCheck.NotNull(keySelector);
            return ToDictionaryAsync(source, keySelector, IdentityFunction<TSource>.Instance, null, cancellationToken);
        }
[ SuppressMessage ( " " , " " ) ] internal static Task < Dictionary < TKey , TSource > > ToDictionaryAsync < TSource , TKey > ( this IDbAsyncEnumerable < TSource > source , Func < TSource , TKey > keySelector , CancellationToken cancellationToken ) { DebugCheck . NotNull ( source ) ; DebugCheck . NotNull ( keySelector ) ; return ToDictionaryAsync ( source , keySelector , IdentityFunction < TSource > . Instance , null , cancellationToken ) ; }
Asynchronously creates a  from an
by enumerating it asynchronously according to a specified key selector function.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function .
A  containing a  that contains selected keys and values.
A containing a that contains selected keys and values .
IDbAsyncEnumerable<TSource>
this
keySelector
Func<TSource, TKey>
A function to extract a key from each element.
A function to extract a key from each element .
cancellationToken
CancellationToken
The token to monitor for cancellation requests.
The token to monitor for cancellation requests .
typeparam
The type of the elements of  .
The type of the elements of .
typeparam
The type of the key returned by  .
The type of the key returned by .