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 and a comparer.
// </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="comparer">
// An <see cref="IEqualityComparer{TKey}" /> to compare keys.
// </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 and a comparer.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function and a comparer .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        internal static Task<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>(
            this IDbAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
        {
            DebugCheck.NotNull(source);
            DebugCheck.NotNull(keySelector);
            return ToDictionaryAsync(source, keySelector, IdentityFunction<TSource>.Instance, comparer, CancellationToken.None);
        }
[ SuppressMessage ( " " , " " ) ] internal static Task < Dictionary < TKey , TSource > > ToDictionaryAsync < TSource , TKey > ( this IDbAsyncEnumerable < TSource > source , Func < TSource , TKey > keySelector , IEqualityComparer < TKey > comparer ) { DebugCheck . NotNull ( source ) ; DebugCheck . NotNull ( keySelector ) ; return ToDictionaryAsync ( source , keySelector , IdentityFunction < TSource > . Instance , comparer , CancellationToken . None ) ; }
Asynchronously creates a  from an
by enumerating it asynchronously according to a specified key selector function and a comparer.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function and a comparer .
A  containing a  that contains selected keys and values.
A containing a that contains selected keys and values .
IDbAsyncEnumerable<TSource>
this
<not_specific>
keySelector
Func<TSource, TKey>
A function to extract a key from each element.
A function to extract a key from each element .
comparer
IEqualityComparer<TKey>
An  to compare keys.
An to compare keys .
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 .