.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.GetObjectByKey Method

Name Parameters Description
GetObjectByKey(XPClassInfo, Object) classInfo, id Returns a persistent object with the specified value of the key property.
GetObjectByKey(XPClassInfo, Object, Boolean) classInfo, id, alwaysGetFromDataStore Returns the reloaded persistent object with the specified value of the key property from a data store.
GetObjectByKey(Type, Object) classType, id Returns the persistent object that has the specified value for its key property.
GetObjectByKey(Type, Object, Boolean) classType, id, alwaysGetFromDataStore Returns the reloaded persistent object with the specified value of the key property from a data store.
GetObjectByKey<ClassType>(Object) id Returns a persistent object of the type designated by the specified generic type parameter, with the specified value for its key property.
GetObjectByKey<ClassType>(Object, Boolean) id, alwaysGetFromDataStore Returns a persistent object of the type designated by the specified generic type parameter, with the specified value for its key property.