Skip to main content

ConnectionProviderSql.RegisterCustomAggregate(ICustomAggregateFormattable) Method

Registers a custom aggregate function 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 RegisterCustomAggregate(
    ICustomAggregateFormattable customAggregate


Name Type Description
customAggregate ICustomAggregateFormattable

A custom aggregate function to register.


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


  • The RegisterCustomAggregate method throws an exception if the customAggregate has already been registered.
  • The customAggregate 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