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

Enables tracking changes made to persistent objects.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public void BeginTrackingChanges()
Public Sub BeginTrackingChanges
public void BeginTrackingChanges()
Public Sub BeginTrackingChanges

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.

See Also