EntityFrameworkQueryableExtensions.AsAsyncEnumerable<TSource> Method

Definition

Returns an IAsyncEnumerable<T> which can be enumerated asynchronously.

public static System.Collections.Generic.IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource> (this System.Linq.IQueryable<TSource> source);
static member AsAsyncEnumerable : System.Linq.IQueryable<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function AsAsyncEnumerable(Of TSource) (source As IQueryable(Of TSource)) As IAsyncEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of source.

Parameters

source
IQueryable<TSource>

An IQueryable<T> to enumerate.

Returns

IAsyncEnumerable<TSource>

The query results.

Exceptions

source is null.

Remarks

Multiple active operations on the same context instance are not supported. Use await to ensure that any asynchronous operations have completed before calling another method on this context. See Avoiding DbContext threading issues for more information and examples.

See Querying data with EF Core for more information and examples.

Applies to