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(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.v19.2.dll

Declaration

public object FlushChangesAsync(
    AsyncCommitCallback callback
)
Public Function FlushChangesAsync(
    callback As AsyncCommitCallback
) As Object
public object FlushChangesAsync(
    AsyncCommitCallback callback
)
Public Function FlushChangesAsync(
    callback As AsyncCommitCallback
) As Object

Parameters

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.

Parameters

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.

Returns

Type Description
Object

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

Returns

Type Description
Object

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

Remarks

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.

Note

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