Skip to main content
C# / .NET Code Reorder Hard +35 XP

Entity Framework Query

Arrange the EF Core query pattern.

Click lines in the correct order

Available lines4 left

Your order

Click lines above to build your solution.

Show answer and explanation

Answer: var users = await context.Users .Where(u => u.IsActive) .OrderBy(u => u.Name) .ToListAsync();

Start from DbSet, apply Where filter, then OrderBy, then materialize asynchronously with ToListAsync.

Hint: Filter, sort, then materialize.

What this challenge tests

Code Reorder in C# / .NET: entity-framework, async.

Related challenges