Session.GetObjectsByKey(XPClassInfo, ICollection, Boolean) Method
Returns reloaded persistent objects with specified key property values from a data store.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public ICollection GetObjectsByKey(
XPClassInfo classInfo,
ICollection idCollection,
bool alwaysGetFromDataStore
)
#Parameters
Name | Type | Description |
---|---|---|
class |
XPClass |
An XPClass |
id |
ICollection | A collection of objects representing the persistent object’s key property values. |
always |
Boolean | true to reload persistent objects from storage, if they are found in memory; otherwise, false. |
#Returns
Type | Description |
---|---|
ICollection | A collection of persistent objects with specified key property values. |
#Remarks
Firstly, the GetObjectsByKey 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 alwaysGetFromDb parameter must be set to true.
Note
The Get