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.ReloadAsync(Object, Boolean, CancellationToken) Method

Recursively reloads a persistent object's state and aggregated objects from the data store, asynchronously.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public Task ReloadAsync(
    object theObject,
    bool forceAggregatesReload,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function ReloadAsync(
    theObject As Object,
    forceAggregatesReload As Boolean,
    cancellationToken As CancellationToken = Nothing
) As Task
public Task ReloadAsync(
    object theObject,
    bool forceAggregatesReload,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function ReloadAsync(
    theObject As Object,
    forceAggregatesReload As Boolean,
    cancellationToken As CancellationToken = Nothing
) As Task

Parameters

Name Type Description
theObject Object

An object which represents the persistent object whose state needs to be reloaded.

forceAggregatesReload Boolean

true, to recursively reload the state of aggregated objects; otherwise, false.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Parameters

Name Type Description
theObject Object

An object which represents the persistent object whose state needs to be reloaded.

forceAggregatesReload Boolean

true, to recursively reload the state of aggregated objects; otherwise, false.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Type Description
Task

A Task that reloads a persistent object's state and aggregated objects from the data store.

Returns

Type Description
Task

A Task that reloads a persistent object's state and aggregated objects from the data store.

Remarks

To start a transaction, use the Session.BeginTransaction method. To commit all data modifications made since the start of the transaction and complete the transaction, call the ReloadAsync or Session.CommitTransaction method. To discard these modifications, call the Session.RollbackTransaction method.

To determine if a transaction is in progress, use the Session.InTransaction property.

After the ReloadAsync method is called, the Session.BeforeCommitTransaction event is raised.

Note

In a Nested Units of Work, calling the ReloadAsync method throws the System.NotSupportedException, since changes within these Units should be saved using only the main thread.

See Also