示例#1
0
        public static Customer RelatedObject(this CustomerEntity entity, Hashtable seenObjects, Hashtable parents)
        {
            if (null == entity)
            {
                return(null);
            }

            if (seenObjects.Contains(entity))
            {
                if (parents.Contains(entity))
                {
                    // avoid cyclic references
                    return(null);
                }
                else
                {
                    return(seenObjects[entity] as Customer);
                }
            }

            return(entity.ToDto(seenObjects, parents));
        }
示例#2
0
 public static Customer ToDto(this CustomerEntity entity)
 {
     return(entity.ToDto(new Hashtable(), new Hashtable()));
 }