I'm trying to extract some Lists of strings into a single List. First I have this class
public class Client
{
public string Name { get; set; }
public List<string> ApiScopes { get; set; }
}
Thus I'm getting my response as a List<Client> and my intention is to take all Client's Scopes into a single List without Looping
I've tried this by LINQ:
var x = clients.Select(c=> c.AllowedScopes.Select(x => x).ToList()).ToList();
this returns a List<List<string>>, and I just want to get all this into one Distinct list of strings.