Share via


DbExpressionBuilder.AggregateDistinct(EdmFunction, DbExpression) Méthode

Définition

Crée un DbFunctionAggregate qui est appliqué de façon séparée.

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

Paramètres

function
EdmFunction

Fonction qui définit l'opération d'agrégation.

argument
DbExpression

Argument sur lequel la fonction d'agrégation doit être calculée.

Retours

Nouvelle fonction qui agrège une référence à la fonction et l'argument donnés. La propriété Distinct de l'agrégat de fonction aura la valeur true.

Exceptions

function ou argument est null.

function n'est pas une fonction d'agrégation ou a plusieurs arguments, ou le type de résultat de argument n'est pas égal au ou apte à être promu en type de paramètre function.

S’applique à