예제 #1
0
 /// <summary>
 /// Accept all changes in all entities associated with <paramref name="entity"/>
 /// </summary>
 /// <param name="entity">Root entity</param>
 public static void AcceptAllChanges(this IObjectWithChangeTracker entity)
 {
     using (ChangeTrackerIterator iterator = ChangeTrackerIterator.Create(entity))
         iterator.Execute(ste => ste.AcceptChanges());
 }
예제 #2
0
 /// <summary>
 /// Stop tracking in all entities associated with <paramref name="entity"/>
 /// </summary>
 /// <param name="entity">Root entity</param>
 public static void StopTrackingAll(this IObjectWithChangeTracker entity)
 {
     using (ChangeTrackerIterator iterator = ChangeTrackerIterator.Create(entity))
         iterator.Execute(ste => ste.StopTracking());
 }