// See IEntityWrapper documentation
        public void ResetContext(ObjectContext context, EntitySet entitySet, MergeOption mergeOption)
        {
            Debug.Assert(null != entitySet, "entitySet should not be null");
            Debug.Assert(null != context, "context");
            Debug.Assert(MergeOption.NoTracking == mergeOption ||
                         MergeOption.AppendOnly == mergeOption,
                         "mergeOption");

            if (!object.ReferenceEquals(Context, context))
            {
                Context     = context;
                MergeOption = mergeOption;
                RelationshipManager.ResetContextOnRelatedEnds(context, entitySet, mergeOption);
            }
        }
        // See IEntityWrapper documentation
        public void ResetContext(ObjectContext context, EntitySet entitySet, MergeOption mergeOption)
        {
            DebugCheck.NotNull(entitySet);
            DebugCheck.NotNull(context);
            Debug.Assert(
                MergeOption.NoTracking == mergeOption ||
                MergeOption.AppendOnly == mergeOption,
                "mergeOption");

            if (!ReferenceEquals(Context, context))
            {
                Context     = context;
                MergeOption = mergeOption;
                RelationshipManager.ResetContextOnRelatedEnds(context, entitySet, mergeOption);
            }
        }