C# & .NET Playbook
Real-world patterns for the problems you actually hit — each playbook shows multiple approaches with tradeoffs, so you can pick the right solution for your situation.
22 of 22 playbooks
Reading Large DB Result Sets & Pagination
Your get all records query just spiked memory to 4GB
Bulk Inserts & Updates
Importing 1M rows takes 5 minutes and times out
The N+1 Query Problem
One list page is firing 1000 database queries
Searching Across Large Datasets
LIKE '%term%' scans every row and crawls
Long-Running Operations
The request times out before the work finishes
Rate Limiting & Throttling
One client is hammering your API into the ground
Idempotency & Duplicate Requests
The user double-clicked and got charged twice
Inter-Service Communication
One slow service is taking down everything upstream
Caching & Cache Invalidation
The same expensive query runs ten thousand times a minute
Background & Scheduled Jobs
Your nightly job runs five times on five servers
Resilience & Retrying Failed Operations
A 50ms network blip just failed a user's request
Concurrency & Parallel Processing
Processing 10000 items one at a time takes forever
Distributed Transactions & Data Consistency
Payment succeeded but the order never shipped
File & Blob Handling at Scale
A few big uploads just exhausted your server memory
Real-Time Data Push to Clients
Clients poll every 3 seconds just to feel live
Mapping & Transforming Data (Entity to DTO)
You accidentally serialized a password hash to the API
Validating Input
Bad data reached your database and corrupted state
Configuration & Secrets Management
A database password just got committed to Git
Time Zones & Dates Across Systems
The meeting shows at the wrong hour for half your users
Soft Deletes & Audit Trails
Who deleted this, and can we get it back?
Multi-Tenancy Data Isolation
One customer just saw another customer's data
Handling Large Data Payloads in Your API
A 2GB upload just spiked your server's memory to 2GB