Indicates whether changes made to persistent objects are being tracked or a list of tracked changes is not empty.
In sessions, true if changes made to persistent objects are currently being tracked; otherwise, false.
In units of work, true if a list of tracked changes is not empty; otherwise, false.
Units of work (ExplicitUnitOfWork and UnitOfWork) automatically set the TrackingChanges property to true, once any change is made to a persistent object. In sessions, this property is set to true when the Session.BeginTrackingChanges method is called. Calling the Session.FlushChanges, Session.FlushChangesAsync, or Session.DropChanges method sets the TrackingChanges property back to false. In sessions, this disables tracking changes until it's re-enabled via the Session.BeginTrackingChanges method call.