Interview guide
.NET Developer Interview Questions & Answers Guide (2026)
A hiring-manager’s interview kit for .net developers — with specific “what to look for” notes on every answer, red flags to watch, and a practical test.
Interviewing a .NET Developer? This guide gives you 26 real interview questions — 14 technical (tagged easy, medium, and hard), 7 behavioral, and 5 role-fit — each with a specific “what to look for” scoring rubric, 8 red flags to reject on, and a hands-on practical test, so you hire on demonstrated evidence, not a confident-sounding résumé.
Key facts
- Role
- .NET Developer
- Technical questions
- 14
- Behavioral
- 7
- Role-fit
- 5
- Red flags
- 8
- Practical test
- Included
How to use this guide
Pick 4-6 technical questions across difficulties, 2-3 behavioral, and 1-2 role-fit for a 45-minute interview. For senior roles, weight harder technical and role-fit higher. Always close with the practical test so you are hiring on evidence, not impressions. The “what to look for” notes are a scoring rubric: strong answers touch most points, weak answers miss them or replace them with platitudes.
Technical questions — Easy
1. When would you use AsNoTracking, and what is the cost of leaving change tracking on for a read-heavy endpoint?
EasyWhat to look for: AsNoTracking for read-only queries avoids the tracking snapshot and identity-map overhead — meaningful on large result sets. Should understand tracking is only needed when you intend to update entities in that context.
2. Where do you store connection strings and API keys for an ASP.NET Core app across local, staging, and production?
EasyWhat to look for: User secrets locally, Azure Key Vault or environment variables in the cloud, layered configuration providers. Never appsettings.json committed to source. Should mention the options pattern (IOptions) for typed config.
Technical questions — Medium
1. What actually happens when you await an async method in C#? Walk me through the state machine and where the continuation runs.
MediumWhat to look for: Compiler-generated state machine, the SynchronizationContext (or lack of one in ASP.NET Core), continuations resuming on a thread-pool thread, and why ConfigureAwait(false) matters in libraries. Red flag: thinks await spawns a new thread.
2. Explain the difference between IEnumerable and IQueryable in an Entity Framework query, and give an example where confusing them causes a bug.
MediumWhat to look for: IQueryable builds an expression tree translated to SQL; IEnumerable pulls into memory then filters in C#. The bug: calling a C# method inside a Where that forces client evaluation, or pulling a whole table into memory before filtering. Should mention the query log.
3. What is the N+1 query problem in EF Core, how do you detect it, and how do you fix it?
MediumWhat to look for: Lazy loading or a loop issuing one query per parent row. Detect via the SQL log, MiniProfiler, or Application Insights dependency traces. Fix with Include, projection to a DTO, or split queries. Should know Include can itself cause a cartesian explosion.
4. How does dependency injection work in ASP.NET Core, and what breaks if you inject a scoped service into a singleton?
MediumWhat to look for: Built-in container, three lifetimes (transient, scoped, singleton), scope per request. Injecting scoped into singleton captures the first scope forever — a captive dependency that leaks a DbContext across requests. Should mention the scope-validation warning.
5. How do you manage EF Core migrations across a team and through deployment to production without losing data?
MediumWhat to look for: Migrations in source control, one migration per logical change, reviewed like code. Apply via idempotent scripts or a migration bundle in the pipeline, not EnsureCreated. Should discuss handling merge conflicts in the model snapshot and never editing an applied migration.
6. Explain the difference between a value type and a reference type in C#, and how boxing can quietly hurt performance.
MediumWhat to look for: Structs on the stack / inline, classes on the heap with references. Boxing when a value type is treated as object (old collections, string.Format, some LINQ). Fixes: generics, Span, avoiding object-typed APIs on hot paths.
7. How would you add caching to a read-heavy endpoint, and how do you keep the cache from serving stale data?
MediumWhat to look for: IMemoryCache for single-instance, IDistributedCache/Redis for scale-out, output caching in .NET 8. Invalidation strategy: TTL, cache-aside with explicit eviction on write, or event-driven. Should acknowledge cache invalidation is the hard part.
8. When would you choose Dapper over Entity Framework Core, and what do you give up?
MediumWhat to look for: Dapper for high-throughput read paths, complex hand-tuned SQL, or reporting where the ORM overhead hurts. You give up change tracking, migrations, and the LINQ abstraction, and you own the SQL and mapping. Should be pragmatic — many apps use both.
Technical questions — Hard
1. A .Result or .Wait() call on an async method deadlocks in a desktop or legacy ASP.NET app but works fine in ASP.NET Core. Why?
HardWhat to look for: Classic sync-over-async deadlock from a captured SynchronizationContext trying to resume on a blocked thread. ASP.NET Core has no sync context so it does not deadlock but still starves the thread pool. Should say "never block on async".
2. DbContext is not thread-safe. What does that mean in practice, and how do you handle it in a service that fires off parallel work?
HardWhat to look for: One DbContext per unit of work, never shared across concurrent operations. Use IDbContextFactory to create a context per parallel task, or serialize the work. Should have hit the "second operation started before the previous completed" exception.
3. Design the API and data model for a system that imports 500,000 rows from a nightly CSV and reconciles them against existing records. What are the bottlenecks?
HardWhat to look for: Bulk insert (EFCore.BulkExtensions or SqlBulkCopy) instead of row-by-row SaveChanges, batching, a background hosted service or queue rather than an HTTP request, change tracking disabled, and set-based reconciliation in SQL rather than a C# loop.
4. A production API intermittently returns 500s under load and Application Insights shows thread-pool starvation. How do you investigate?
HardWhat to look for: Look for sync-over-async blocking, unawaited tasks, or a synchronous I/O call on the request path. Check the thread-pool queue length, dump analysis, and slow dependencies. Fix the blocking call rather than raising MinThreads as a band-aid.
Behavioral questions
1. Tell me about a production performance problem you traced to the database. How did you find it and what did you change?
What to look for: Specific: used the query log, Application Insights, or a profiler; identified the query; fixed it with an index, projection, or query rewrite — not a guess. Measured the before and after.
2. Describe a time you kept a legacy .NET Framework app running while planning its migration. How did you balance the two?
What to look for: Pragmatism: kept the business running, migrated incrementally (strangler pattern, shared database, targeting .NET Standard where possible), did not insist on a big-bang rewrite. Managed risk.
3. Tell me about the worst production incident you shipped and what you learned.
What to look for: Takes ownership, describes the root cause in detail, and talks about the guardrails added afterward (tests, monitoring, alerts). Avoids blaming the framework or a teammate.
4. How do you keep your code review comments useful without coming across as pedantic?
What to look for: Separates blockers from suggestions, explains the why, focuses on async correctness and query cost over style nits, asks questions rather than issuing decrees.
5. Walk me through how you onboard yourself into an unfamiliar .NET codebase.
What to look for: Reads the README, runs it locally with the database, traces a request from controller to database, maps the DI registrations, opens small PRs early to validate understanding.
6. How do you manage your day when you have 7 hours async with the team and only 1 hour of overlap?
What to look for: Batches questions, writes detailed PR descriptions, records short walkthroughs, protects the overlap hour for blocking questions. Demonstrates async discipline.
7. When have you pushed back on a technical decision or a deadline, and how did you frame it?
What to look for: Offers a trade-off (scope, quality, deadline) with reasoning rather than a flat no. Communicates early, brings evidence, and disagrees-and-commits once the call is made.
Role-fit questions
1. Why the .NET stack specifically? Would you be comfortable if part of the work is maintaining an older Framework app?
What to look for: Has a genuine preference grounded in the tooling, type system, or ecosystem — and is not too precious to maintain legacy code, which is most real .NET work.
2. What does the first 30 days look like in this role for you to feel productive?
What to look for: Codebase and database tour, shipping a small bug-fix PR in week 1, owning a feature by week 2, asking to pair. Red flag: expects weeks of onboarding with no output.
3. How do you feel about 4 hours of timezone overlap with a US team?
What to look for: Treats the overlap as sacred for syncs and blocking questions, protects the async hours for deep work, has done it before if possible.
4. Our stack is ASP.NET Core + EF Core + SQL Server on Azure, with a React frontend. Anything there you have not used and how would you ramp up?
What to look for: Honest gap assessment plus a concrete ramp plan (docs, a spike, pairing). Fakery about Azure or EF depth is a red flag.
5. Where do you land between shipping fast and getting the data model right the first time?
What to look for: Knows the data model and migrations are expensive to change later, so invests there, while being pragmatic about the code around it. Names the trade-off explicitly.
Red flags
Any one of these alone is usually reason to pass, especially combined with weak answers elsewhere.
- • Thinks await spawns a new thread or that async makes code faster.
- • Blocks on async with .Result or .Wait() and cannot explain the deadlock risk.
- • Never reads the SQL EF generates and treats the ORM as a black box.
- • Cannot explain the N+1 problem or has never fixed a slow query.
- • Injects a DbContext as a singleton or shares one across parallel work.
- • Commits connection strings and secrets to appsettings.json in source control.
- • Uses object and casts everywhere instead of generics, and shrugs at boxing.
- • Blames SQL Server or the framework before profiling their own queries.
Practical test
4-hour take-home: build an ASP.NET Core minimal API for a small inventory system backed by SQL Server (or SQLite) via EF Core. Requirements: CRUD endpoints with validation, a paginated and filterable list endpoint that does not N+1, one endpoint that requires a transaction across two tables, configuration read from user secrets, and at least 3 xUnit tests including one integration test against the database. We grade on: correctness and data modeling (40%), async and query correctness (25%), tests (20%), and configuration and error handling (15%). Bonus points for a Dockerfile and a health-check endpoint.
Scoring rubric
Score each answer 1-4: (1) Misses most of the rubric or gives platitudes; (2) Hits some points but cannot go deep when pressed; (3) Covers the rubric and can defend the answer under follow-ups; (4) Adds unprompted nuance, trade-offs, or real examples beyond the rubric. Hire at an average of 3.0+ across technical, behavioral, and role-fit, with zero red flags, and a pass on the practical test.
Skip the interview grind — hire a pre-vetted .NET Developer
We run this exact vetting process for you. Tell us the role and we’ll send 3 pre-vetted .net developers within 5 business days — from $2800/mo, with a 30-day replacement guarantee.
Related
Written by Syed Ali
Founder, Remoteria
Syed Ali founded Remoteria after a decade building distributed teams across 4 continents. He helps US businesses source, vet, onboard, and scale pre-vetted offshore talent in engineering, design, marketing, and operations.
- • 10+ years building distributed remote teams
- • Direct hiring experience across US, UK, EU, and APAC markets
- • Specialist in offshore vetting and cross-timezone team integration
Last updated: April 12, 2026