Interview practice

.NET Developer

5–8 years · Senior — C# · ASP.NET Core · Entity Framework · SQL Server · LINQ · Azure

0–2 years 2–5 years 5–8 years 8+ years
scenario Entity Framework and performance 1 of 6
You observe a significant drop in query performance after introducing a new feature using Entity Framework. What do you investigate first?
What a strong answer covers

Examines the generated SQL for inefficiencies; checks for N+1 query issues; reviews the indices on the involved tables; profiles the database performance to identify bottlenecks; considers eager vs. lazy loading implications; plans to use query logging for further insights.

The follow-up you would get

You identify an N+1 problem. What changes do you make to resolve it?

Could you have answered that?
scenario Ownership of incidents 2 of 6
A production incident arises where users are unable to log in due to a misconfigured authentication service. How do you manage the incident and communicate with stakeholders?
What a strong answer covers

Immediately assesses the service status and error logs; rolls back the recent configuration change if necessary; establishes a communication plan for updates; creates a temporary workaround for affected users; documents the incident for post-mortem analysis; identifies root cause and plans for prevention.

The follow-up you would get

After resolving the incident, how do you ensure similar issues do not occur in the future?

Could you have answered that?
ownership A decision that impacted performance 3 of 6
Can you discuss a decision you made regarding caching strategy that didn't yield the expected performance improvements?
What a strong answer covers

Describes the caching mechanism chosen and its intended impact; outlines performance metrics before and after implementation; pinpoints the misjudgement in the caching strategy and its effects; explains any adjustments made post-implementation.

The follow-up you would get

What alternative caching strategies did you consider?

Could you have answered that?
scenario Design and scaling 4 of 6
You are tasked with designing a new microservice that must handle variable loads and ensure high availability. What are your first steps?
What a strong answer covers

Defines clear service boundaries and responsibilities; chooses a suitable API protocol (REST or gRPC); implements rate limiting and circuit breakers; designs for eventual consistency and data replication; plans for horizontal scaling using container orchestration; evaluates cloud service options for resilience.

The follow-up you would get

What considerations do you have for handling data migrations in this microservice design?

Could you have answered that?
technical System Design 5 of 6
An application that processes user transactions has experienced data inconsistencies with a spike in users. How do you design the system to handle this issue?
What a strong answer covers

Identifies the need for eventual consistency; designs with CQRS (Command Query Responsibility Segregation) pattern; considers using distributed transactions or event sourcing; implements a retry mechanism for failed transactions; assesses data partitioning strategies for scalability.

The follow-up you would get

How do you ensure that the system remains performant under high load?

Could you have answered that?
technical Entity Framework 6 of 6
A migration introduced a new table, and now change tracking is causing significant performance degradation. What do you investigate, and how do you respond?
What a strong answer covers

Examines the size of the tracked entities; checks if tracking should be disabled for read-only queries; considers using AsNoTracking for performance; reviews the number of relationships and navigation properties; evaluates the impact of lazy loading on performance.

The follow-up you would get

What are the trade-offs of using AsNoTracking?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.