Skip to main content
.NET Framework 4.5.2+

IObjectSpace.GetObjectsQuery<T>(Boolean) Method

Gets a queryable data structure that provides functionality to evaluate queries against a specific business object type.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

IQueryable<T> GetObjectsQuery<T>(
    bool inTransaction = false
)

Optional Parameters

Name Type Default Description
inTransaction Boolean False

true, if querying a data store for objects includes all in-memory changes into query results; otherwise, false. Has effect in XPO only.

Type Parameters

Name
T

Returns

Type Description
IQueryable<T>

An IQueryable<T> object that provides functionality to evaluate queries against a specific business object type.

Remarks

You can use the following code to query data in EF Core and XPO applications:

IQueryable<Payment> query = objectSpace.GetObjectsQuery<Payment>(true);
object obj = query.Where(p => p.Hours == 4).FirstOrDefault();

The GetObjectsQuery<T> method has implementations in XPObjectSpace, EFCoreObjectSpace, and NonPersistentObjectSpace classes:

See Also