Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Session.FlushChanges() Method

Saves changes made to persistent objects to a data store, and clears a list of tracked changes.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public void FlushChanges()

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 FlushChanges method sets the Session.TrackingChanges property to false. This method is automatically called when a session or unit of work commits a transaction.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FlushChanges() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also