共用方式為


DbExpressionBuilder.AggregateDistinct(EdmFunction, DbExpression) 方法

定義

建立以不同方式套用的新 DbFunctionAggregate

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

參數

function
EdmFunction

定義彙總作業的函式。

argument
DbExpression

應該計算其彙總函式的引數。

傳回

含有指定函式及引數之參考的新函式彙總。 函式匯總的 Distinct 屬性會具有 true 值。

例外狀況

函式或引數為 null。

function 不是彙總函式,或有多個引數,或者引數的結果類型不等於或可提升至函式的參數類型。

適用於