Interview practice

.NET Developer

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

0–2 years 2–5 years 5–8 years 8+ years
technical Async/Await 1 of 6
You have an ASP.NET Core API endpoint that is slow and runs a database call inside an async method. The endpoint is called 100 times concurrently, and the server CPU usage spikes to 100%. How do you diagnose the issue?
What a strong answer covers

Checks for blocking calls in the async method; reviews the use of 'ConfigureAwait(false)'; analyses thread pool exhaustion and task scheduling; looks for synchronous code in async methods; considers using 'ValueTask' for performance improvements.

The follow-up you would get

What specific code patterns could lead to thread pool exhaustion?

Could you have answered that?
technical Dependency Injection 2 of 6
In your ASP.NET Core application, you notice that a singleton service is holding on to state that should be scoped to the request. What steps do you take to rectify this?
What a strong answer covers

Identifies the service lifetime mismatch; changes the service registration from singleton to scoped; ensures that the service is not being accessed in a static context; checks for unintended shared state between requests; tests the application for thread safety after the change.

The follow-up you would get

What are the implications of sharing state in a singleton service?

Could you have answered that?
scenario Database access patterns 3 of 6
You need to optimise a query that is running slower than expected in production. What steps do you take to improve its performance?
What a strong answer covers

Examines the execution plan for bottlenecks; checks for missing indexes and suggests adding them; reviews database statistics for accuracy; considers query rewriting for efficiency; tests changes in a staging environment before deployment.

The follow-up you would get

You find that the query is still slow after optimisation. How do you monitor its performance over time?

Could you have answered that?
scenario Azure deployment 4 of 6
Your deployment to Azure fails due to a configuration issue, and the error message is vague. Walk me through your first steps.
What a strong answer covers

Checks deployment logs for specific error codes; verifies resource group and service configurations; inspects Azure App Service settings; reviews application settings for connection strings and secrets; determines if a rollback is necessary and how to communicate the issue.

The follow-up you would get

The configuration error was caused by a missing environment variable. How do you prevent this from happening again?

Could you have answered that?
technical API Design 5 of 6
You are tasked with designing a RESTful API for a new feature that requires creating, reading, updating, and deleting resources. What key considerations do you take into account?
What a strong answer covers

Defines clear resource URIs and HTTP methods for CRUD operations; ensures idempotency for PUT and DELETE methods; implements proper status codes for responses; considers pagination for large datasets; validates input using model binding and data annotations.

The follow-up you would get

How do you handle versioning of your API?

Could you have answered that?
ownership A feature you owned end to end 6 of 6
Describe a feature you were responsible for delivering from start to finish. What challenges did you encounter?
What a strong answer covers

Details the specific feature and its context; outlines the key challenges faced during development; explains the solutions implemented to overcome these challenges; reflects on lessons learned; discusses the impact of the feature on users or the business.

The follow-up you would get

What would you approach differently if given another chance?

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.