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 list endpoint that looks like one query and is four hundred. Fix it twice: once by projecting to exactly what the response needs, and once for the case where whole entities really are required.
One statement for the summary path, and a bounded number for the entity path.
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.