DbExpressionBuilder.Any 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新參數 DbExpression ,用以判斷指定的集合參數是否非空。
多載
| 名稱 | Description |
|---|---|
| Any(DbExpression) |
建立一個新參數 DbExpression ,用以判斷指定的集合參數是否非空。 |
| Any(DbExpression, Func<DbExpression,DbExpression>) |
建立一個新函 DbQuantifierExpression 數,判斷該謂詞是否對輸入集合中的任一元素成立。 |
| Any(DbExpressionBinding, DbExpression) |
建立一個新函 DbQuantifierExpression 數,判斷該謂詞是否對輸入集合中的任一元素成立。 |
Any(DbExpression)
建立一個新參數 DbExpression ,用以判斷指定的集合參數是否非空。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbExpression ^ Any(System::Data::Common::CommandTrees::DbExpression ^ source);
public static System.Data.Common.CommandTrees.DbExpression Any(this System.Data.Common.CommandTrees.DbExpression source);
static member Any : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbExpression
<Extension()>
Public Function Any (source As DbExpression) As DbExpression
參數
- source
- DbExpression
一個指定輸入集合的表達式。
傳回
一個新 DbNotExpression 物件套用到一個具有指定參數的新物件 DbIsEmptyExpression 。
例外狀況
source 為 null。
source 沒有集合結果類型。
適用於
Any(DbExpression, Func<DbExpression,DbExpression>)
建立一個新函 DbQuantifierExpression 數,判斷該謂詞是否對輸入集合中的任一元素成立。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbQuantifierExpression ^ Any(System::Data::Common::CommandTrees::DbExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ predicate);
public static System.Data.Common.CommandTrees.DbQuantifierExpression Any(this System.Data.Common.CommandTrees.DbExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> predicate);
static member Any : System.Data.Common.CommandTrees.DbExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> -> System.Data.Common.CommandTrees.DbQuantifierExpression
<Extension()>
Public Function Any (source As DbExpression, predicate As Func(Of DbExpression, DbExpression)) As DbQuantifierExpression
參數
- source
- DbExpression
一個指定輸入集合的表達式。
- predicate
- Func<DbExpression,DbExpression>
一個代表要評估每個輸入集合成員的謂詞的方法。 此方法必須產生一個布林結果型別的表達式,以提供謂詞邏輯。
傳回
一個新的 DbQuantifierExpression,代表 Any 操作。
例外狀況
適用於
Any(DbExpressionBinding, DbExpression)
建立一個新函 DbQuantifierExpression 數,判斷該謂詞是否對輸入集合中的任一元素成立。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbQuantifierExpression ^ Any(System::Data::Common::CommandTrees::DbExpressionBinding ^ input, System::Data::Common::CommandTrees::DbExpression ^ predicate);
public static System.Data.Common.CommandTrees.DbQuantifierExpression Any(this System.Data.Common.CommandTrees.DbExpressionBinding input, System.Data.Common.CommandTrees.DbExpression predicate);
static member Any : System.Data.Common.CommandTrees.DbExpressionBinding * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbQuantifierExpression
<Extension()>
Public Function Any (input As DbExpressionBinding, predicate As DbExpression) As DbQuantifierExpression
參數
- input
- DbExpressionBinding
一個表達式綁定,指定輸入集合。
- predicate
- DbExpression
一個表示詞的表達式,代表一個要為輸入集合中每個成員評估的謂詞。
傳回
一個新的 DbQuantifierExpression,代表 Any 操作。
例外狀況
input 或 predicate 為空值。
所 predicate 產生的表達式沒有布林結果型態。