Q11 — Eager, Lazy, and Explicit Loading — Differences and the N+1 Problem Level: Mid-Level | Topic: Entity Framework Core The Three Loading Strategies Eager Loading ( Include() ): Related data is loaded in the same query...
Q22 — OWASP Top 10 — How Each Applies to .NET APIs with Mitigations Level: Senior | Topic: Security The Most Critical Risks A01 — Broken Access Control: Never trust client-sent IDs. Always load the resource then verify o...
Q1 — What is the difference between value types and reference types in C#? Level: Junior | Topic: C# Fundamentals The Short Answer Value types store data directly on the stack (or inline within an object). Reference type...
Q10 — Global Exception Handling with IExceptionHandler (.NET 8) Level: Senior | Topic: Web API The Problem Without centralised exception handling, every controller action needs its own try/catch, error responses are inco...
Q6 — Explain the ASP.NET Core Middleware Pipeline and Write Custom Middleware Level: Mid-Level | Topic: ASP.NET Core How the Pipeline Works ASP.NET Core processes every HTTP request through a linear chain of middleware c...
Q14 — EF Core Performance — Compiled Queries, Split Queries, Raw SQL Level: Senior | Topic: Entity Framework Core Performance Bottlenecks in EF Core Every LINQ query goes through an expression tree compiler that translat...
Q4 — Memory Management — Stack, Heap, GC Generations, IDisposable Level: Senior | Topic: C# Fundamentals Stack vs Heap The stack stores value types and method frames — allocation and deallocation are O(1) pointer moves. ...
Here's a comprehensive breakdown of all 10 features, from junior through to principal engineer level. I'll build a visual architecture overview first, then walk through each. Now let's go deep on each feature, level by l...
Q7 — DI Service Lifetimes — Singleton, Scoped, Transient and the Captive Dependency Trap Level: Mid-Level | Topic: ASP.NET Core The Three Lifetimes Singleton: One instance per application. Created once, reused forever. U...
A pragmatic performance playbook for EF Core: find bottlenecks, fix N+1s with projection/eager loading, and when to cache or use AsNoTracking.
Q5 — async/await Internals — State Machines, Pitfalls, ValueTask Level: Senior | Topic: C# Fundamentals How async/await Works Under the Hood The C# compiler transforms every async method into a state machine struct . Eac...
Q20 — Span<T>, Memory<T>, and ArrayPool<T> — Zero-Allocation Patterns Level: Senior | Topic: Performance Optimization The Problem: Allocation Pressure In high-throughput .NET code, excessive heap alloca...
1. Understanding the Asynchronous Programming Model The diagram above shows the core problem async solves. In the synchronous model, every blocking I/O call (database query, HTTP request, file read) stalls its thread. Yo...
Q27 — CQRS with MediatR — Commands, Queries, Pipeline Behaviours Level: Senior | Topic: Architecture CQRS in a Nutshell Command Query Responsibility Segregation separates operations that change state (Commands) from oper...
Q26 — Clean Architecture — Solution Structure, Dependency Rule, Layer Responsibilities Level: Senior | Topic: Architecture The Core Principle — Dependency Rule In Clean Architecture, dependencies point inward only . The ...
Q2 — Abstract Classes vs Interfaces — Differences and When to Use Each Level: Mid-Level | Topic: C# Fundamentals The Core Distinction Abstract classes express an IS-A relationship — they share state, constructors, and a ...
Q9 — REST API Design — HTTP Verbs, Status Codes, and ProblemDetails Level: Junior | Topic: Web API HTTP Verb Semantics GET: Read a resource or collection. Idempotent. Returns 200 OK or 404 Not Found. POST: Create a new r...
Q25 — Integration Testing with WebApplicationFactory and Testcontainers Level: Senior | Topic: Testing Why Integration Tests? Unit tests verify logic in isolation. Integration tests verify the full ASP.NET Core pipeline ...
Q21 — Rate Limiting in .NET 7+ — Fixed Window, Sliding Window, Token Bucket Level: Senior | Topic: Performance Optimization Why Rate Limiting? Rate limiting protects your API from overload — whether from abusive clients,...
Q3 — Explain the C# Type System: Records, Nullable Reference Types, and Pattern Matching Level: Mid-Level | Topic: C# Fundamentals Records (C# 9+) Records are compiler-synthesised types that provide value equality , immu...
Q23 — Secrets Management — User Secrets, Azure Key Vault, Managed Identity Level: Mid-Level | Topic: Security The Problem Secrets committed to source control are a leading cause of breaches. The correct approach: use dif...
1. Introduction to Logging in ASP.NET Core ASP.NET Core logging is built into the framework from day one — no third-party package required to get started. The system is built around three abstractions that compose cleanl...
Practical guidance to register and consume services correctly in .NET: lifetimes, scope validation, hosted services, and background work patterns.
Q13 — EF Core Migrations — Production Deployment Strategy Level: Senior | Topic: Entity Framework Core The Problem with Naive Migration Deployment Running MigrateAsync() at app startup in a multi-instance deployment is d...
Q8 — JWT Authentication + Policy-Based Authorization in ASP.NET Core Level: Senior | Topic: ASP.NET Core JWT Authentication Flow The client authenticates once (POST /auth/login) and receives a signed JWT access token. On...
Part 1: The Foundations of Production .NET Services A practical guide for building, operating, and deploying reliable ASP.NET Core services on AWS. Audience: .NET developers moving from working APIs to production service...
Monolithic — the starting point for most systems. A traditional monolith is a single process; a modular monolith enforces domain boundaries within it (great for teams not ready for microservices); vertical slice organise...
Q19 — Caching Layers — IMemoryCache, IDistributedCache, HybridCache, Output Cache Level: Senior | Topic: Performance Optimization Choosing the Right Cache IMemoryCache: In-process, zero serialisation, microsecond latency...
Q12 — AsNoTracking vs Tracked Queries — Change Tracker Internals Level: Mid-Level | Topic: Entity Framework Core How the Change Tracker Works When you load an entity with a tracked query, EF Core stores a snapshot of the...
Q17 — Window Functions — ROW_NUMBER, LAG, SUM OVER, Running Totals Level: Mid-Level | Topic: SQL Server What Are Window Functions? Window functions operate across a set of rows without collapsing them into a single outpu...