Skip to main content
.NET 6.0+

BaseObjectSpace.CreateCollection(Type, CriteriaOperator, IList<SortProperty>) Method

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

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public virtual IList CreateCollection(
    Type objectType,
    CriteriaOperator criteria,
    IList<SortProperty> sorting
)

Parameters

Name Type Description
objectType Type

The type of persistent objects to include in the collection.

criteria CriteriaOperator

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

sorting IList<SortProperty>

An IList<SortProperty> object that specifies sorting.

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 and sorted according to the given sort list. 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