.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

NonPersistentObjectSpace.GetObjectsCount(Type, CriteriaOperator) Method

Returns the number of objects specified.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll


public override int GetObjectsCount(
    Type objectType,
    CriteriaOperator criteria
Public Overrides Function GetObjectsCount(
    objectType As Type,
    criteria As CriteriaOperator
) As Integer


Name Type Description
objectType Type

A Type object that identifies the type of objects against which the calculation will be performed.

criteria CriteriaOperator

The CriteriaOperator that specifies the criteria for object selection.


Type Description

An integer value that is the count of non-persistent objects that satisfy the specified criteria.


You can handle the NonPersistentObjectSpace.ObjectsCountGetting event to supply custom logic for calculating the GetObjectsCount result. If the ObjectsCountGetting event is not handled, or if the ObjectsCountGettingEventArgs.Count is null, the GetObjectsCount method calls the IObjectSpace.CreateCollection method to calculate the count.

See Also