语言

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。

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

适用于