HomeChallengesRepsProblemsLeaderboardTake a challenge

CRUD + Pagination

A Products API that pages properly and never pulls the whole table into memory.

Intermediate20 min on the clock7 graded checks · 100 pointsASP.NET Core RefactorPro
Graded by reading your code against the checklist below.

What you build

  • Define an EF Core DbContext with a Products set
  • Compose the search filter on IQueryable before anything is materialised
  • Return the total row count as an X-Total-Count response header
  • Page with Skip/Take and bound the page size
  • Add create, update and delete

Done means

GET /products?page=1&pageSize=20 returns one page and an accurate X-Total-Count.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Register the DbContext for injection+15Querying a database
  2. Query read-only data with AsNoTracking+20Querying a database
  3. Compose the filter on IQueryable+20Querying a database
  4. Page with Skip and Take+20Pagination
  5. Return the total as a response header+10Pagination
  6. Bound the page size+5Pagination
  7. Add create, update and delete+10Querying a database

What it teaches

The rest of ASP.NET Core Refactor