Exemple #1
0
        public object SaveNodeWithRelationShip(object proxy)
        {
            object          entity         = ProxyCloner.ConvertProxyToEntity(proxy);
            ParentChildGlue parentRelation = new ParentChildGlue(null, entity, string.Empty);

            _toWalk.Push(parentRelation);
            PersistObjectGraphWithRelationship(_toWalk.Pop());
            return(entity);
        }
Exemple #2
0
        private void Schedule(Object toSchedule, object parent, string memberName)
        {
            if (toSchedule == null)
            {
                return;
            }

            if (toSchedule.GetType().IsArray || toSchedule.GetType() == typeof(IList))
            {
                foreach (Object item in ((Array)toSchedule))
                {
                    Schedule(item, parent, memberName);
                }
            }
            else
            {
                object          entityToSchedule = ProxyCloner.ConvertProxyToEntity(toSchedule);
                ParentChildGlue parentRelation   = new ParentChildGlue(parent, entityToSchedule, memberName);
                _toWalk.Push(parentRelation);
            }
        }