Session.BeginTrackingChanges() Method
Enables tracking changes made to persistent objects.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v20.2.dll
Declaration
Remarks
Units of work (ExplicitUnitOfWork and UnitOfWork) automatically track changes made to persistent objects within their scope. In sessions, you need to call the BeginTrackingChanges method to enable tracking changes. To determine if changes are currently being tracked in a session, use the Session.TrackingChanges property.
Calling the BeginTrackingChanges method automatically starts a transaction (an explicit transaction in an explicit unit of work) and raises the Session.BeforeBeginTrackingChanges and Session.AfterBeginTrackingChanges events, allowing you to monitor progress.
To manage changes made in a session or unit of work, use the Session.FlushChanges, Session.FlushChangesAsync, and Session.DropChanges methods.
NOTE
If the Session.TrackingChanges property returns true, calling the BeginTrackingChanges method throws an exception.