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.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public Task ReloadAsync(
object theObject,
bool forceAggregatesReload,
CancellationToken cancellationToken = default(CancellationToken)
)
#Parameters
Name | Type | Description |
---|---|---|
the |
Object | An object which represents the persistent object whose state needs to be reloaded. |
force |
Boolean | true, to recursively reload the state of aggregated objects; otherwise, false. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
cancellation |
Cancellation |
null | A Cancellation |
#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