語言

DbRawSqlQuery<TElement>.AllAsync 方法

定義

多載

名稱 Description
AllAsync(Func<TElement,Boolean>)

非同步判斷查詢中的所有元素是否滿足某一條件。

AllAsync(Func<TElement,Boolean>, CancellationToken)

非同步判斷查詢中的所有元素是否滿足某一條件。

AllAsync(Func<TElement,Boolean>)

非同步判斷查詢中的所有元素是否滿足某一條件。

public System.Threading.Tasks.Task<bool> AllAsync(Func<TElement,bool> predicate);
member this.AllAsync : Func<'Element, bool> -> System.Threading.Tasks.Task<bool>
Public Function AllAsync (predicate As Func(Of TElement, Boolean)) As Task(Of Boolean)

參數

predicate
Func<TElement,Boolean>

一個用來測試每個元素條件的函數。

傳回

一個代表非同步操作的任務。 任務結果包含true若查詢結果的每個元素都通過指定謂詞的測試;否則,。 false

例外狀況

predicate 是 null .

備註

不支援在同一上下文實例上進行多個主動操作。 在此上下文中呼叫其他方法前,請使用「wait」以確保所有非同步操作已完成。

適用於

AllAsync(Func<TElement,Boolean>, CancellationToken)

非同步判斷查詢中的所有元素是否滿足某一條件。

public System.Threading.Tasks.Task<bool> AllAsync(Func<TElement,bool> predicate, System.Threading.CancellationToken cancellationToken);
member this.AllAsync : Func<'Element, bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>

參數

predicate
Func<TElement,Boolean>

一個用來測試每個元素條件的函數。

cancellationToken
CancellationToken

A CancellationToken 在等待任務完成時觀察。

傳回

一個代表非同步操作的任務。 任務結果包含true若查詢結果的每個元素都通過指定謂詞的測試;否則,。 false

例外狀況

predicate 是 null .

備註

不支援在同一上下文實例上進行多個主動操作。 在此上下文中呼叫其他方法前,請使用「wait」以確保所有非同步操作已完成。

適用於