共用方式為


DbExpressionBuilder.Where 方法

定義

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

public static System.Data.Entity.Core.Common.CommandTrees.DbFilterExpression Where(this System.Data.Entity.Core.Common.CommandTrees.DbExpression source, Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression,System.Data.Entity.Core.Common.CommandTrees.DbExpression> predicate);
static member Where : System.Data.Entity.Core.Common.CommandTrees.DbExpression * Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression, System.Data.Entity.Core.Common.CommandTrees.DbExpression> -> System.Data.Entity.Core.Common.CommandTrees.DbFilterExpression
<Extension()>
Public Function Where (source As DbExpression, predicate As Func(Of DbExpression, DbExpression)) As DbFilterExpression

參數

source
DbExpression

指定輸入集的運算式。

predicate
Func<DbExpression,DbExpression>

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

傳回

表示 Any 運算的新 DbQuantifierExpression。

例外狀況

述詞所產生的運算式為 null。

述詞所產生的運算式沒有布林結果類型。

適用於