AsyncEnumerable<TResult> Struct

Definition

Represents an asynchronous sequence produced by executing a compiled query.

public struct AsyncEnumerable<TResult> : Microsoft.EntityFrameworkCore.Query.Internal.IAsyncEnumerableAccessor<TResult>
public readonly struct AsyncEnumerable<TResult> : Microsoft.EntityFrameworkCore.Query.Internal.IAsyncEnumerableAccessor<TResult>
type AsyncEnumerable<'Result> = struct
    interface IAsyncEnumerableAccessor<'Result>
Public Structure AsyncEnumerable(Of TResult)
Implements IAsyncEnumerableAccessor(Of TResult)

Type Parameters

TResult

The result type.

Inheritance
AsyncEnumerable<TResult>
Implements
Microsoft.EntityFrameworkCore.Query.Internal.IAsyncEnumerableAccessor<TResult>

Constructors

AsyncEnumerable<TResult>(IAsyncEnumerable<TResult>)

Creates a new instance of AsyncEnumerable<TResult>

Methods

ForEachAsync(Action<TResult>, CancellationToken)

Asynchronously enumerates the query results and performs the specified action on each element.

LoadAsync(CancellationToken)

Asynchronously enumerates the query. When using Entity Framework, this causes the results of the query to be loaded into the associated context. This is equivalent to calling ToList and then throwing away the list (without the overhead of actually creating the list).

ToArrayAsync(CancellationToken)

Asynchronously creates an array from this AsyncEnumerable<TResult>.

ToDictionaryAsync<TKey,TElement>(Func<TResult,TKey>, Func<TResult,TElement>, CancellationToken)

Creates a Dictionary<TKey,TValue> from this AsyncEnumerable<TResult> by enumerating it asynchronously according to a specified key selector and an element selector function.

ToDictionaryAsync<TKey,TElement>(Func<TResult,TKey>, Func<TResult,TElement>, IEqualityComparer<TKey>, CancellationToken)

Creates a Dictionary<TKey,TValue> from this AsyncEnumerable<TResult> by enumerating it asynchronously according to a specified key selector function, a comparer, and an element selector function.

ToDictionaryAsync<TKey>(Func<TResult,TKey>, CancellationToken)

Creates a Dictionary<TKey,TValue> from this AsyncEnumerable<TResult> by enumerating it asynchronously according to a specified key selector function.

ToDictionaryAsync<TKey>(Func<TResult,TKey>, IEqualityComparer<TKey>, CancellationToken)

Creates a Dictionary<TKey,TValue> from this AsyncEnumerable<TResult> by enumerating it asynchronously according to a specified key selector function and a comparer.

ToListAsync(CancellationToken)

Asynchronously creates a List<T> from this AsyncEnumerable<TResult> by enumerating it asynchronously.

Explicit Interface Implementations

IAsyncEnumerableAccessor<TResult>.AsyncEnumerable

Applies to