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.FlushChangesAsync(CancellationToken) Method

Asynchronously saves changes made to persistent objects to a data store and clears a tracked changes list.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public Task FlushChangesAsync(
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function FlushChangesAsync(
    cancellationToken As CancellationToken = Nothing
) As Task
public Task FlushChangesAsync(
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function FlushChangesAsync(
    cancellationToken As CancellationToken = Nothing
) As Task

Parameters

Name Type Description
cancellationToken CancellationToken

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

Parameters

Name Type Description
cancellationToken CancellationToken

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

Returns

Type Description
Task

A Task that saves changes made to persistent objects to a data store and clears a tracked changes list.

Returns

Type Description
Task

A Task that saves changes made to persistent objects to a data store and clears a tracked changes list.

Remarks

Call this method to save any changes made to persistent objects after the Session.TrackingChanges property has been set to true. To discard changes and clear a list of tracked changes, call the Session.DropChanges method.

When a list of tracked changes is about to be processed, the Session.BeforeFlushChanges event is raised. After a list of tracked changes has been cleared, the Session.AfterFlushChanges event is raised.

Note

Calling the FlushChangesAsync method sets the Session.TrackingChanges property to false. This method is automatically called when a session or unit of work commits a transaction.

See Also