.NET & SQL Interview Prep ๐
Welcome to your personal interview study guide covering C# .NET and SQL Server. This site pairs concept explanations with a hands-on lab โ a real Docker-hosted SQL Server with intentionally bad stored procedures you can run, diagnose, and fix yourself.
๐งช Start Here: Hands-On Lab
Spin up a local SQL Server and run the 6 real-world performance scenarios:
cd docker && docker compose up -d
bash init-db.sh # creates DB, tables, seed data, all stored procs
cd ../src/SqlDemos
dotnet run -- all # benchmark all 6 bad vs fixed proc pairs
| # | Scenario | Antipattern |
|---|---|---|
| 1 | Cursor Catastrophe | Row-by-row UPDATE |
| 2 | Parameter Sniffing Ghost | Cached wrong plan |
| 3 | Non-SARGable Date Trap | Functions on columns |
| 4 | SELECT * Flood | Pulling NVARCHAR(MAX) |
| 5 | Key Lookup Tax | Non-covering index |
| 6 | Scalar UDF Killer | Serial row-by-row UDF |
What's Covered
๐๏ธ SQL Server
Topics every developer touching SQL Server should know โ from basic joins through to stored procedure optimization.
| Section | Why It Matters |
|---|---|
| Joins | Foundational โ you WILL get asked about these |
| Stored Procedures | Core topic for the role |
| Indexes | Critical for "why is this slow?" conversations |
| Query Optimization | Best practices and quick wins |
| Execution Plans | How to diagnose a slow query like a pro |
| Parameter Sniffing | A common gotcha โ shows senior-level awareness |
โ๏ธ C# Language
The language features you'll be expected to discuss fluently.
| Section | Why It Matters |
|---|---|
| Async / Await | Always asked; easy to get wrong conceptually |
| SOLID Principles | Architecture discussions and code review answers |
| Dependency Injection | Core to .NET Core โ expected knowledge |
| Generics & LINQ | Shows you write clean, modern C# |
๐ .NET & Data Access
How you connect C# to SQL Server.
| Section | Why It Matters |
|---|---|
| Entity Framework Core | Modern ORM used in most .NET shops |
| Dapper | Lightweight ORM, great for stored proc calls |
| Calling Stored Procedures | Practical patterns โ EF Core + Dapper side-by-side |
๐ Interview Prep
Structured game plan and cheat sheets.
| Section | Why It Matters |
|---|---|
| Game Plan | How to spend your study time tonight |
| Quick Reference Card | One-page cheat sheet to review right before |
| Top Q&A | Most common questions with ideal answers |
How to Run This Site
Then open http://localhost:8000 in your browser.
Study tip
Start with the Game Plan to prioritize your time, then work through SQL Server topics first โ those are the areas you've flagged as needing the most brush-up.