Language

EntityFrameworkQueryableExtensions.AsAsyncEnumerable Method

Definition

Returns an IAsyncEnumerable which can be enumerated asynchronously.

public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Linq.IQueryable source);
static member AsAsyncEnumerable : System.Linq.IQueryable<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>

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

An IQueryable to enumerate.

Returns

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