C# / .NET Code Reorder Medium +20 XP
LINQ Query Chain
Arrange the LINQ query correctly.
Click lines in the correct order
Available lines4 left
Your order
Click lines above to build your solution.
Show answer and explanation
Answer: var result = employees
.Where(e => e.IsActive)
.Select(e => e.Name)
.ToList();
Filter with Where first (reduce data), then project with Select, then materialize with ToList.
Hint: Filter before selecting, select before materializing.
What this challenge tests
Code Reorder in C# / .NET: linq, chaining.