My method will need to return a collection that contains settings.AgentIds and agent ids that correspond to settings.LabelIds. So I decided to use Union
IEnumerable<IAgentsGroup> labelGroups = _agentsGroups.Values.Where(x => settings.LabelIds.Contains(x.Id));
IEnumerable<IEnumerable<Guid>> labelAgentIds = labelGroups.Select(x => x.AgentIds);
return labelAgentIds.Union(settings.AgentIds);
But I dont now how to combine it into the one Collection<Guid>,
beacuse settings.AgentIds has type Collection<Guid> and labelAgentIds has IEnumerable<IEnumerable<Guid>> type?