Querying a databaseintermediate
IQueryable lets you build a query in pieces and send one efficient SQL statement — the classic mistake is fetching every row into memory and filtering there.
A Products API that pages properly and never pulls the whole table into memory.
GET /products?page=1&pageSize=20 returns one page and an accurate X-Total-Count.
Published in full, before you start — every point is one of these and there is nothing else.
IQueryable lets you build a query in pieces and send one efficient SQL statement — the classic mistake is fetching every row into memory and filtering there.
No endpoint should return an unbounded list; Skip/Take plus a total count is how the caller knows what page they are on and how many there are.