.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.FlushChangesAsync(AsyncCommitCallback) Method

Asynchronously saves changes made to persistent objects to a data store, clears a list of tracked changes and notifies upon completion.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.2.dll


public object FlushChangesAsync(
    AsyncCommitCallback callback


Name Type Description
callback AsyncCommitCallback

An AsyncCommitCallback delegate to be called after changes have been saved and a list of tracked changes has been cleared. This collection is passed as a parameter to callback. Use a callback to store the exception information passed as a parameter, and use this information later to raise the exception again, within the original thread. Do not raise exceptions or modify persistent objects within a callback.


Type Description

An object identifying the current asynchronous operation, intended for internal use.


Call this method to asynchronously 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.


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

See Also