DbExpressionBuilder.AggregateDistinct(EdmFunction, DbExpression) 方法

定義

創造一個以獨特方式應用的新事物 DbFunctionAggregate

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionAggregate ^ AggregateDistinct(System::Data::Metadata::Edm::EdmFunction ^ function, System::Data::Common::CommandTrees::DbExpression ^ argument);
public static System.Data.Common.CommandTrees.DbFunctionAggregate AggregateDistinct(this System.Data.Metadata.Edm.EdmFunction function, System.Data.Common.CommandTrees.DbExpression argument);
static member AggregateDistinct : System.Data.Metadata.Edm.EdmFunction * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionAggregate
<Extension()>
Public Function AggregateDistinct (function As EdmFunction, argument As DbExpression) As DbFunctionAggregate

參數

function
EdmFunction

定義聚合運算的函數。

argument
DbExpression

應該計算總量函數的論點。

傳回

一個新的函數聚合,並引用給定函數與參數。 函數聚合的 Distinct 性質值為 true

例外狀況

functionargument 為空值。

function 不是聚合函數,或有多個參數,或 的 argument 結果型別不等於或無法升變於參數 function型別。

適用於