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

Namespace: Xafari
Assembly: Xafari.XF (in Xafari.XF.dll)

Syntax

C#

public static object FindEntity(
   this IObjectSpaceobjectSpace,
   TypeentityType,
   CriteriaOperatorcriteria = null,
   boolinTransaction = false
)

Parameters

objectSpace

 

entityType

A Type object which represents the type of objects to search for.

criteria

A CriteriaOperator which specifies the criteria for object selection.

inTransaction

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

 

 

Return Value

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

 

See Also