From a List of builtAgents I need all items with OptimPriority == 1 and only 5 items with OptimPriority == 0. I do this with two seperate queries but I wonder if I could make this with only one query.
IEnumerable<Agent> priorityAgents =
from pri in builtAgents where pri.OptimPriority == 1 select pri;
IEnumerable<Agent> otherAgents =
(from oth in builtAgents where oth.OptimPriority == 0 select oth).Take(5);
Concatenate both result using the Concat operator.So its basically a single query