Quick recap
All 299 questions, one line each
Filter to one category, collapse what you already know, and print the rest. Click any question to open the full explanation.
The 20 things to be sure of
If you remember nothing else, remember these.
| 1 | Value types copy the data, reference types copy the pointer. "Stack vs heap" is an implementation detail. |
| 2 | Override Equals → you must override GetHashCode, and hash only immutable fields. |
| 3 | throw; preserves the stack trace. throw ex; destroys it. |
| 4 | await on I/O creates no thread — it frees one. That's why it scales. |
| 5 | I/O-bound → async. CPU-bound → Parallel. Never Task.Run around async I/O. |
| 6 | No fire-and-forget background work: exceptions vanish, and the scoped DbContext is already disposed. |
| 7 | .Result/.Wait() = deadlock in classic ASP.NET, thread-pool starvation in Core. |
| 8 | Always bound concurrency — size it to the bottleneck (connection pool, rate limit), not the CPU. |
| 9 | IQueryable runs in SQL, IEnumerable runs in memory. Don't downgrade too early. |
| 10 | LINQ is deferred — enumerating twice runs the query twice. |
| 11 | Any() not Count() > 0. And All() on an empty list is true. |
| 12 | Read-only EF query → AsNoTracking() + project to a DTO. |
| 13 | N+1 is the most common EF bug — find it by logging the SQL, fix it with Include or a projection. |
| 14 | Concurrency conflicts: a rowversion token → DbUpdateConcurrencyException → 409, don't overwrite silently. |
| 15 | Middleware order is behaviour: exception handler first, UseAuthentication before UseAuthorization. |
| 16 | A Singleton must never hold a Scoped service — captive dependency. Catch it with ValidateOnBuild. |
| 17 | Never expose entities: data leaks, over-posting, circular references. Use DTOs. |
| 18 | Status codes are the contract: 400 malformed · 401 unauthenticated · 403 not permitted · 409 conflict. Never 200 with an error inside. |
| 19 | CORS is a browser rule — that's why Postman works. It protects users, not your API. |
| 20 | A timeout ≠ a failure. Retry only transient errors, with backoff + jitter, and only if the operation is idempotent. |
Words that signal seniority
idempotent · captive dependency · thread-pool starvation ·
optimistic concurrency · deferred execution · N+1 ·
backpressure · exponential backoff with jitter ·
circuit breaker · trust boundary · set-based ·
separation of concerns · measure first · trade-off
How to answer, whatever they ask
What it is → why it matters → what you'd do in practice, then tie it to something you've actually built. If you don't know, say so and say how you'd find out.