.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPCollection(Session, Type, CriteriaOperator, SortProperty[]) Constructor

Initializes a new instance of the XPCollection class with a specified Session and criteria-specific options.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll

Declaration

public XPCollection(
    Session session,
    Type objType,
    CriteriaOperator theCriteria,
    params SortProperty[] sortProperties
)

Parameters

Name Type Description
session Session

The Session that will be used to load and save persistent objects.

objType Type

The type of persistent objects to include into the collection.

theCriteria CriteriaOperator

The CriteriaOperator that specifies the criteria for object selection.

sortProperties SortProperty[]

An array of SortProperty that specifies the sort order for the collection.

Remarks

If the XPBaseCollection.LoadingEnabled property is set to true (default value) the collection is populated with objects when its contents are accessed for the first time (for instance, when the XPBaseCollection.Count property is read).

The newly created collection will use the specified session to load and save persistent objects.

See Also