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.GetObjectsByKey(XPClassInfo, ICollection, Boolean) Method

Returns reloaded persistent objects with specified key property values from a data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public ICollection GetObjectsByKey(XPClassInfo classInfo, ICollection idCollection, bool alwaysGetFromDataStore)
Public Function GetObjectsByKey(classInfo As XPClassInfo, idCollection As ICollection, alwaysGetFromDataStore As Boolean) As ICollection
public ICollection GetObjectsByKey(XPClassInfo classInfo, ICollection idCollection, bool alwaysGetFromDataStore)
Public Function GetObjectsByKey(classInfo As XPClassInfo, idCollection As ICollection, alwaysGetFromDataStore As Boolean) As ICollection

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object which contains the metadata information of the persistent class.

idCollection ICollection

A collection of objects representing the persistent object's key property values.

alwaysGetFromDataStore Boolean

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

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object which contains the metadata information of the persistent class.

idCollection ICollection

A collection of objects representing the persistent object's key property values.

alwaysGetFromDataStore 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.

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 GetObjectsByKey method does not find objects until they are saved to a data store.

See Also