Skip to main content

ConnectionProviderSql.RegisterCustomAggregates(ICollection<ICustomAggregateFormattable>) Method

Registers custom aggregate functions to use in any CriteriaOperator-based criteria in your application.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Data.v22.2.dll

NuGet Package: DevExpress.Data


public void RegisterCustomAggregates(
    ICollection<ICustomAggregateFormattable> customAggregates


Name Type Description
customAggregates ICollection<ICustomAggregateFormattable>

A collection of custom aggregate functions to register.


To search for a specific registered custom aggregate function, call the CriteriaOperator.GetCustomAggregate function.


  • The RegisterCustomAggregates method throws an exception if one of the customAggregates has already been registered.
  • Each of the customAggregates must have a unique Name property value. If you use standard aggregate names (Min, Max, Sum, Avg, Single, Exists, and Count), an exception is raised.
See Also