EntityFrameworkQueryableExtensions.AsAsyncEnumerable<TSource> 方法

定義

IAsyncEnumerable<T> 回可以非同步列舉的 。

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)

類型參數

TSource

source 項目的類型。

參數

source
IQueryable<TSource>

IQueryable<T> 列舉的 。

傳回

IAsyncEnumerable<TSource>

查詢結果。

例外狀況

sourcenull

備註

不支援相同內容實例上的多個作用中作業。 使用 await 以確保任何非同步作業都已完成,再在此內容上呼叫另一個方法。 如需詳細資訊和範例,請參閱 避免 DbCoNtext 執行緒問題

如需詳細資訊和範例 ,請參閱使用 EF Core 查詢資料

適用於