EntityFrameworkQueryableExtensions.AsAsyncEnumerable<TSource> Metoda

Definice

Vrátí hodnotu IAsyncEnumerable<T> , která může být asynchronně výčtu.

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)

Parametry typu

TSource

Typ elementů .source

Parametry

source
IQueryable<TSource>

An IQueryable<T> k výčtu.

Návraty

IAsyncEnumerable<TSource>

Výsledky dotazu.

Výjimky

source je null.

Poznámky

Více aktivních operací ve stejné kontextové instanci není podporováno. Pomocí se ujistěte await , že všechny asynchronní operace byly dokončeny před voláním jiné metody v tomto kontextu. Další informace a příklady najdete v tématu Předcházení problémům s vlákny DbContext .

Další informace a příklady najdete v tématu Dotazování dat pomocí EF Core .

Platí pro