DbExpressionBuilder.Aggregate(EdmFunction, DbExpression) 方法

定义

创建新的 DbFunctionAggregate

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

参数

function
EdmFunction

定义聚合操作的函数。

argument
DbExpression

应计算聚合函数的参数。

返回

具有对给定函数和参数的引用的新函数聚合。 函数聚合的 Distinct 属性将具有值 false

例外

functionargument null。

function 不是聚合函数或具有多个参数,或者结果类型 argument 不等于或可提升为 function参数类型的参数类型。

适用于