Session.GetLoadedObjectByKey<ClassType>(Object) Method
Returns the persistent object of the type designated by the specified generic type parameter, with the specified value of the key property previously loaded from a data store.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
id | Object | An object which represents the key property’s value of the persistent object. |
Type Parameters
Name | Description |
---|---|
ClassType | A type of objects to search for. |
Returns
Type | Description |
---|---|
ClassType | An object which represents a persistent object with the specified value of the key property. null (Nothing in Visual Basic) if the persistent object was not found in memory. |
Remarks
To get the up to date object from the data store, use the Session.GetObjectByKey method.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetLoadedObjectByKey<ClassType>(Object) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.