The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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.v19.2.dll

Declaration

public object EvaluateInTransaction(
    XPClassInfo classInfo,
    CriteriaOperator expression,
    CriteriaOperator criteria
)
Public Function EvaluateInTransaction(
    classInfo As XPClassInfo,
    expression As CriteriaOperator,
    criteria As CriteriaOperator
) As Object
public object EvaluateInTransaction(
    XPClassInfo classInfo,
    CriteriaOperator expression,
    CriteriaOperator criteria
)
Public Function EvaluateInTransaction(
    classInfo As XPClassInfo,
    expression As CriteriaOperator,
    criteria As CriteriaOperator
) As Object

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object that identifies the type of objects against which the expression will be evaluated.

expression CriteriaOperator

A CriteriaOperator object that specifies the expression to evaluate.

criteria CriteriaOperator

A CriteriaOperator object that specifies the filter criteria. The objects that match this criteria (based on in-memory object changes) will be used to evaluate the expression.

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object that identifies the type of objects against which the expression will be evaluated.

expression CriteriaOperator

A CriteriaOperator object that specifies the expression to evaluate.

criteria CriteriaOperator

A CriteriaOperator object that specifies the filter criteria. The objects that match this criteria (based on in-memory object changes) will be used to evaluate the expression.

Returns

Type Description
Object

The value evaluated.

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 EvaluateInTransaction method returns the same result as the Session.Evaluate or Session.Evaluate<ClassType> method does with the Session.InTransactionMode property enabled.

See Also