Пример #1
0
        public ChangeTrackingHelper <T> GetChanges()
        {
            // 重建新的ChangeTrackingList
            ChangeTrackingHelper <T> changes = new ChangeTrackingHelper <T>();

            foreach (T existing in this)
            {
                if (existing.TrackingState != TrackingInfo.Unchanged)
                {
                    changes.Add(existing);
                }
            }

            // Append deleted items
            foreach (T deleted in deletedItems)
            {
                changes.Add(deleted);
            }
            return(changes);
        }
Пример #2
0
        public ChangeTrackingList <T> GetChanges()
        {
            ChangeTrackingHelper <T> changes = changeTracker.GetChanges(); // Get just the changed items

            return(new ChangeTrackingList <T>(changes));
        }