EntityFrameworkQueryableExtensions.AsAsyncEnumerable<TSource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The query results.
Exceptions
source
is null
.
source
is not a IAsyncEnumerable<T>.
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
Entity Framework