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.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public Task<ICollection[]> GetObjectsByKeyAsync(
ObjectsByKeyQuery[] queries,
bool alwaysGetFromDataStore,
CancellationToken cancellationToken = default(CancellationToken)
)
#Parameters
Name | Type | Description |
---|---|---|
queries | Objects |
An array of Objects |
always |
Boolean | true, to always reload persistent objects from storage, even if they are found in memory; otherwise, false. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
cancellation |
Cancellation |
null | A Cancellation |
#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 Get