Swipeable cards. First principles. Real C# code. Every topic — from async/await to system design — built to make you a stronger .NET developer, ready for the interview and the job.
Already learning? Log in · Open the app
Every lesson is free. ₹99/year unlocks unlimited bookmarks, tagging & deep search.
See how you'll learn
A web server has a limited thread pool. If every request blocks a thread while waiting on a database call, the server runs out of threads under load and starts queuing or rejecting requests.
A synchronous waiter takes your order, stands at the kitchen window until it’s ready, then serves you — no other tables get attention meanwhile.
An async waiter takes your order, hands it to the kitchen, and immediately serves other tables. When your food is ready, they come back to you. Same waiter, many tables — no one blocked.
async/await is syntactic sugar over the Task-based Asynchronous Pattern (TAP).
The compiler rewrites your method into a state machine that can pause at each await and resume later — without blocking a thread while paused.
| Thread | Task |
|---|---|
| OS-level, expensive to create | Lightweight abstraction over work |
| Always occupies a thread while running | Can be I/O-bound and hold no thread while waiting |
| Manual lifecycle management | Composable via async/await, WhenAll, ContinueWith |
public async Task<Order> GetOrderAsync(int id)
{
var order = await _db.Orders
.FindAsync(id)
.ConfigureAwait(false);
if (order is null)
throw new NotFoundException(id);
return order;
}Wait() synchronously blocks the current thread while it waits for the async method to complete.
NET Core?
When should you use async void, and why is it dangerous everywhere else?