Пример #1
0
 public SiteGroupDto Map(SiteGroup entity)
 {
     return new SiteGroupDto
                {
                    Id = entity.Id,
                    ClientId = entity.ClientId,
                    Name = entity.Name
                };
 }
Пример #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)
     };
 }
Пример #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
                 };
 }