score:2

Accepted answer

You need something like this:

Orders.Where(x=> x.Zones.All(z=>Path.Zones.Contains(z))).ToList();

Your Solution does not work because:

var jobsInPath = jobs.Where(x => x.zones.Intersect(path).Any()).ToList();

Here Intersect returns the common strings... Order 4 also contains A hence for order 4, It will return A and Any() expression will be true.


Related Articles