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

XPCollection(PersistentCriteriaEvaluationBehavior, Session, CriteriaOperator, Boolean) Constructor

Initializes a new instance of the XPCollection<T> class with specified settings.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.2.dll


public XPCollection(
    PersistentCriteriaEvaluationBehavior criteriaEvaluationBehavior,
    Session session,
    CriteriaOperator condition,
    bool selectDeleted


Name Type Description
criteriaEvaluationBehavior PersistentCriteriaEvaluationBehavior

A PersistentCriteriaEvaluationBehavior enumeration value that specifies how the persistent criteria are evaluated.

session Session

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

condition CriteriaOperator

The CriteriaOperator that specifies the criteria for object selection.

selectDeleted Boolean

true if objects marked as deleted are loaded to the collection from a data store; otherwise, false.


Note that when an XPCollection<T> is created using a constructor with the criteriaEvaluationBehavior parameter, the collection is loaded immediately, and its XPBaseCollection.LoadingEnabled property is automatically set to false. After that, the collection cannot be reloaded using the XPBaseCollection.Reload method, since object loading is disabled.

See Also