BaseObjectSpace.CreateCollection(Type, CriteriaOperator) Method

Creates and initializes a collection of objects of the specified type, filtered according to the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public IList CreateCollection(
    Type objectType,
    CriteriaOperator criteria
)
Public Function CreateCollection(
    objectType As Type,
    criteria As CriteriaOperator
) As IList

Parameters

Type Name Description
Type objectType

The type of persistent objects to include in the collection.

CriteriaOperator criteria

The CriteriaOperator that specifies a criteria for object selection in a data store.

Returns

Type Description
IList

A IList collection that includes the persistent objects of the specified type. In addition, only objects that satisfy the specified criteria will be retrieved to this collection.

Remarks

Use this method to create a collection of objects of the specified type, filtered according to the specified criteria. This method calls a protected virtual method, CreateCollection, which must be overridden in the BaseObjectSpace class descendants.

The newly created collection will use the current Object Space to load and save persistent objects.

See Also