Ejemplo n.º 1
0
 public SiteGroupDto Map(SiteGroup entity)
 {
     return new SiteGroupDto
                {
                    Id = entity.Id,
                    ClientId = entity.ClientId,
                    Name = entity.Name
                };
 }
Ejemplo n.º 2
0
 public SiteGroupDto MapWithParent(SiteGroup entity)
 {
     return new SiteGroupDto
     {
         Id = entity.Id,
         ClientId = entity.ClientId,
         Name = entity.Name,
         Parent = new SiteStructureElementDtoMapper().Map(entity.Parent)
     };
 }
Ejemplo n.º 3
0
 public SiteGroupDto MapWithHasChildrenAndParent(SiteGroup entity, IEnumerable<long> childIdsThatCannotBecomeParent)
 {
     return new SiteGroupDto
                 {
                     Id = entity.Id,
                     ClientId = entity.ClientId,
                     Name = entity.Name,
                     HasChildren = entity.HasChildren,
                     Parent = entity.Parent != null ? new SiteStructureElementDtoMapper().Map(entity.Parent) : null,
                     ChildIdsThatCannotBecomeParent = childIdsThatCannotBecomeParent
                 };
 }