Skip to main content
All docs
V25.1
  • 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.v25.1.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