The OrderBy method will sort items in ascending order by default. Now, given that the numeric representation of a boolean is:
false
= 0true
= 1
false
values will naturally come first. If you want to reverse the order just use the descending
keyword:
var trueData = (from data in x
orderby numbersToFilterBy.Contains(data.Id) descending, data.Id
select data).ToList();