BaseObjectSpace.FindObject(Type, CriteriaOperator, Boolean) Method

Searches for the first object of the specified type, matching the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.1.dll

Declaration

public virtual object FindObject(
    Type objectType,
    CriteriaOperator criteria,
    bool inTransaction
)
Public Overridable Function FindObject(
    objectType As Type,
    criteria As CriteriaOperator,
    inTransaction As Boolean
) As Object

Parameters

Type Name Description
Type objectType

A Type object which is the type of the object to search for.

CriteriaOperator criteria

A DevExpress.Data.Filtering.CriteriaOperator descendant which is the criteria to match persistent objects.

Boolean inTransaction

true if all objects (in the database and retrieved) are processed by the specified criteria; otherwise, false. Has effect in XPO only.

Returns

Type Description
Object

An object which is the first persistent object which matches the specified criteria. null (Nothing in Visual Basic) if there is no persistent object which matches the criteria.

This method does nothing and returns null (Nothing in VB). So, it should be overridden in the BaseObjectSpace class' descendants.

See Also