DbExpressionBuilder.Where 方法

定義

建立新的 DbFilterExpression,它會使用指定的述詞篩選給定輸入集的項目。

C#
public static System.Data.Common.CommandTrees.DbFilterExpression Where (this System.Data.Common.CommandTrees.DbExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> predicate);

參數

source
DbExpression

指定輸入集的運算式。

predicate
Func<DbExpression,DbExpression>

方法,表示要針對輸入集中每個成員進行評估的述詞。 這個方法必須產生具有可提供述詞邏輯之布林結果型別的運算式。

傳回

表示 Any 運算的新 DbQuantifierExpression。

例外狀況

sourcepredicate 為 null。

-或-

predicate 所產生的運算式為 null。

predicate 所產生之運算式沒有布林值結果類型。

適用於

產品 版本
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1