EntityFrameworkQueryableExtensions.AsAsyncEnumerable<TSource> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳 和 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>
An IQueryable<T> 要列舉。
傳回
IAsyncEnumerable<TSource>
查詢結果。
例外狀況
source 是 null。
source 不是 IAsyncEnumerable<T>。
備註
不支援在同一上下文實例上進行多個主動操作。 在此上下文中,請用 await 以確認所有非同步操作已完成,然後再呼叫其他方法。 更多資訊與範例請參見 「避免 DbContext 執行緒問題 」。
更多資訊與範例請參閱使用 EF Core 查詢資料 。