src/Shared/EntityFramework/Infrastructure/IDbAsyncEnumerableExtensions.cs
// <summary>
// Asynchronously creates a <see cref="Dictionary{TKey, TElement}" /> from an <see cref="IDbAsyncEnumerable{TSource}" />
// by enumerating it asynchronously according to a specified key selector function, a comparer, and an element 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>
// <typeparam name="TElement">
// The type of the value returned by <paramref name="elementSelector" /> .
// </typeparam>
// <param name="keySelector"> A function to extract a key from each element. </param>
// <param name="elementSelector"> A transform function to produce a result element value 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, TElement}" /> that contains values of type
// <typeparamref
//     name="TElement" />
// selected from the input sequence.
// </returns>
Asynchronously creates a  from an
by enumerating it asynchronously according to a specified key selector function, a comparer, and an element selector function.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function a comparer and an element selector function .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        internal static Task<Dictionary<TKey, TElement>> ToDictionaryAsync<TSource, TKey, TElement>(
            this IDbAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector,
            IEqualityComparer<TKey> comparer)
        {
            DebugCheck.NotNull(source);
            DebugCheck.NotNull(keySelector);
            DebugCheck.NotNull(elementSelector);
            return ToDictionaryAsync(source, keySelector, elementSelector, comparer, CancellationToken.None);
        }
[ SuppressMessage ( " " , " " ) ] internal static Task < Dictionary < TKey , TElement > > ToDictionaryAsync < TSource , TKey , TElement > ( this IDbAsyncEnumerable < TSource > source , Func < TSource , TKey > keySelector , Func < TSource , TElement > elementSelector , IEqualityComparer < TKey > comparer ) { DebugCheck . NotNull ( source ) ; DebugCheck . NotNull ( keySelector ) ; DebugCheck . NotNull ( elementSelector ) ; return ToDictionaryAsync ( source , keySelector , elementSelector , comparer , CancellationToken . None ) ; }
Asynchronously creates a  from an
by enumerating it asynchronously according to a specified key selector function, a comparer, and an element selector function.
Asynchronously creates a from an by enumerating it asynchronously according to a specified key selector function a comparer and an element selector function .
A  containing a  that contains values of type

selected from the input sequence.
A containing a that contains values of type selected from the input sequence .
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 .
elementSelector
Func<TSource, TElement>
A transform function to produce a result element value from each element.
A transform function to produce a result element value 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 .
typeparam
The type of the value returned by  .
The type of the value returned by .