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.SetKeyValue(Object, Object) Method

Assigns the key property's value of the specified persistent object.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public void SetKeyValue(
    object theObject,
    object keyValue
)
Public Sub SetKeyValue(
    theObject As Object,
    keyValue As Object
)
public void SetKeyValue(
    object theObject,
    object keyValue
)
Public Sub SetKeyValue(
    theObject As Object,
    keyValue As Object
)

Parameters

Name Type Description
theObject Object

A persistent object whose key property value is set.

keyValue Object

An object representing the key property's value.

Parameters

Name Type Description
theObject Object

A persistent object whose key property value is set.

keyValue Object

An object representing the key property's value.

Remarks

If the specified persistent object is a null reference, a ArgumentNullException is thrown. If the current session already contains an object with the specified key value, the DifferentObjectsWithSameKeyException is thrown when committing changes to data store.

To get the value of a persistent object's key property, use the Session.GetKeyValue method.

See Also