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.GetObjectsByKeyFromSproc(XPClassInfo, Boolean, String, OperandValue[]) Method

Returns reloaded persistent objects from a data store, with key property values obtained via the specified stored procedure.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public ICollection GetObjectsByKeyFromSproc(XPClassInfo classInfo, bool alwaysGetFromDataStore, string sprocName, params OperandValue[] parameters)
Public Function GetObjectsByKeyFromSproc(classInfo As XPClassInfo, alwaysGetFromDataStore As Boolean, sprocName As String, ParamArray parameters As OperandValue()) As ICollection
public ICollection GetObjectsByKeyFromSproc(XPClassInfo classInfo, bool alwaysGetFromDataStore, string sprocName, params OperandValue[] parameters)
Public Function GetObjectsByKeyFromSproc(classInfo As XPClassInfo, alwaysGetFromDataStore As Boolean, sprocName As String, ParamArray parameters As OperandValue()) As ICollection

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object which contains the metadata information of the persistent objects that are retrieved based on the stored procedure's results.

alwaysGetFromDataStore Boolean

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

sprocName String

A String value that specifies the stored procedure's name.

parameters OperandValue[]

An array of OperandValue objects representing parameters to pass to the stored procedure.

Parameters

Name Type Description
classInfo XPClassInfo

An XPClassInfo object which contains the metadata information of the persistent objects that are retrieved based on the stored procedure's results.

alwaysGetFromDataStore Boolean

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

sprocName String

A String value that specifies the stored procedure's name.

parameters OperandValue[]

An array of OperandValue objects representing parameters to pass to the stored procedure.

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

First, the GetObjectsByKeyFromSproc method executes the specified stored procedure with parameters and retrieves key property values into a result set. Then, the method searches in memory for persistent objects with retrieved 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 GetObjectsByKeyFromSproc method does not find objects until they are saved to a data store.

To learn more about executing stored procedures in XPO, refer to Stored Procedures.

See Also