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

Declaration

public void RegisterCustomAggregate(
    ICustomAggregateFormattable customAggregate
)

Parameters

Name Type Description
customAggregate ICustomAggregateFormattable

A custom aggregate function to register.

Remarks

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

Note

  • 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