Session.EvaluateInTransaction(XPClassInfo, CriteriaOperator, CriteriaOperator) Method
Evaluates the specified expression for objects of the specified type, taking into account all in-memory object changes.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public object EvaluateInTransaction(
XPClassInfo classInfo,
CriteriaOperator expression,
CriteriaOperator criteria
)
#Parameters
Name | Type | Description |
---|---|---|
class |
XPClass |
An XPClass |
expression | Criteria |
A Criteria |
criteria | Criteria |
A Criteria |
#Returns
Type | Description |
---|---|
Object | The value evaluated. |
#Remarks
To build the expression, use Aggregate functions or a combination of these functions. For instance, by using the “Count()” function (Aggregate.Count) it is possible to calculate the number of objects to be retrieved. The criteria parameter specifies the criteria used for object selection. The expression will only be evaluated against the objects that match the criteria. Set the criteria to null (Nothing in Visual Basic) to evaluate the expression against all classInfo objects in a data store.
To construct the expression and criteria, use the static CriteriaOperator.Parse method, which takes a string representation of the required expression and retrieves a corresponding CriteriaOperator object.
Note
The Evaluate