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.GetObjectsByKeyAsync(ObjectsByKeyQuery[], Boolean, CancellationToken) Method

Asynchronously returns reloaded persistent objects that have specified key property values from a data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public Task<ICollection[]> GetObjectsByKeyAsync(
    ObjectsByKeyQuery[] queries,
    bool alwaysGetFromDataStore,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function GetObjectsByKeyAsync(
    queries As ObjectsByKeyQuery(),
    alwaysGetFromDataStore As Boolean,
    cancellationToken As CancellationToken = Nothing
) As Task(Of ICollection())
public Task<ICollection[]> GetObjectsByKeyAsync(
    ObjectsByKeyQuery[] queries,
    bool alwaysGetFromDataStore,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function GetObjectsByKeyAsync(
    queries As ObjectsByKeyQuery(),
    alwaysGetFromDataStore As Boolean,
    cancellationToken As CancellationToken = Nothing
) As Task(Of ICollection())

Parameters

Name Type Description
queries ObjectsByKeyQuery[]

An array of ObjectsByKeyQuery objects that store persistent object information and key values. Queries use this data to retrieve specific persistent objects.

alwaysGetFromDataStore Boolean

true, to always reload persistent objects from storage, even if they are found in memory; otherwise, false.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Parameters

Name Type Description
queries ObjectsByKeyQuery[]

An array of ObjectsByKeyQuery objects that store persistent object information and key values. Queries use this data to retrieve specific persistent objects.

alwaysGetFromDataStore Boolean

true, to always reload persistent objects from storage, even if they are found in memory; otherwise, false.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Type Description
Task<ICollection[]>

A Task that returns an array of object collections.

Returns

Type Description
Task<ICollection[]>

A Task that returns an array of object collections.

Remarks

The GetObjectsByKeyAsync method searches in memory for persistent objects with specified key property values. If such objects are found, they are not reloaded. To get the up-to-date objects from storage, the alwaysGetFromDataStore parameter must be set to true.

Note

The GetObjectsByKeyAsync method does not find objects until they are saved to a data store.

See Also