Skip to main content
.NET 6.0+

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

NuGet Package: DevExpress.ExpressApp

Declaration

public virtual object FindObject(
    Type objectType,
    CriteriaOperator criteria,
    bool inTransaction
)

Parameters

Name Type Description
objectType Type

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

criteria CriteriaOperator

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

inTransaction Boolean

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.

Remarks

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

See Also