public List <GroupDTO> GetGroupsForParticipant(string token, int participantId) { var groups = _mpGroupRepository.GetGroupsForParticipant(token, participantId); if (groups == null) { return(null); } var groupDetail = groups.Select(Mapper.Map <MpGroup, GroupDTO>).ToList(); var configuration = MpObjectAttributeConfigurationFactory.Group(); var mpAttributes = _attributeRepository.GetAttributes(null); foreach (var group in groupDetail) { var attributesTypes = _objectAttributeService.GetObjectAttributes(token, group.GroupId, configuration, mpAttributes); group.AttributeTypes = attributesTypes.MultiSelect; group.SingleAttributes = attributesTypes.SingleSelect; } return(groupDetail); }