/// <summary>
        /// bulk save sliced child change actions
        /// </summary>
        /// <param name="page">a page/slice of child change actions</param>
        internal void BatchSaveChangeActions(IList <IMigrationAction> page)
        {
            Debug.Assert(m_runTimeChangeGroup != null);

            const int bulkChangeActionInsertionSize = 1000;
            int       changeActionCount             = 0;
            int       pageIndex = 0;

            while (pageIndex < page.Count)
            {
                using (RuntimeEntityModel context = RuntimeEntityModel.CreateInstance())
                {
                    RTChangeGroup rtChangeGroupCache = getNativeRTChangeGroup(context);
                    Debug.Assert(null != rtChangeGroupCache);

                    while (pageIndex < page.Count && changeActionCount < bulkChangeActionInsertionSize)
                    {
                        SqlMigrationAction action = page[pageIndex] as SqlMigrationAction;
                        Debug.Assert(null != action);

                        // cache "Dirty" flag, as assignin 'this' to its ChangeGroup will set the flag to true
                        bool actionWasDirty = action.IsDirty;
                        action.ChangeGroup = this;

                        if (!action.IsPersisted)
                        {
                            IMigrationItemSerializer serializer = ManagerWithMigrationItemSerializers[action.Action];
                            action.CreateNew(serializer);
                            context.AddToRTChangeActionSet(action.RTChangeAction);
                            action.RTChangeAction.ChangeGroup = rtChangeGroupCache;
                            ++changeActionCount;
                        }
                        else if (actionWasDirty)
                        {
                            IMigrationItemSerializer serializer     = ManagerWithMigrationItemSerializers[action.Action];
                            RTChangeAction           rtChangeAction = action.RTChangeAction;
                            if (null != rtChangeAction)
                            {
                                rtChangeAction = context.GetObjectByKey(rtChangeAction.EntityKey) as RTChangeAction;
                            }
                            else
                            {
                                rtChangeAction = context.RTChangeActionSet.Where(ca => ca.ChangeActionId == action.ActionId).First();
                            }

                            rtChangeAction.Recursivity           = action.Recursive;
                            rtChangeAction.IsSubstituted         = action.State == ActionState.Skipped ? true : false;
                            rtChangeAction.ActionId              = action.Action;
                            rtChangeAction.SourceItem            = serializer.SerializeItem(action.SourceItem);
                            rtChangeAction.ToPath                = action.Path;
                            rtChangeAction.ItemTypeReferenceName = action.ItemTypeReferenceName;
                            rtChangeAction.FromPath              = action.FromPath;
                            rtChangeAction.Version               = action.Version;
                            rtChangeAction.MergeVersionTo        = action.MergeVersionTo;

                            if (action.MigrationActionDescription != null &&
                                action.MigrationActionDescription.DocumentElement != null)
                            {
                                rtChangeAction.ActionData = action.MigrationActionDescription.DocumentElement.OuterXml;
                            }
                            ++changeActionCount;
                        }

                        ++pageIndex;
                    }
                    context.TrySaveChanges();
                    changeActionCount = 0;
                }
            }
        }