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 Debugging 1 of 6
A production application is experiencing intermittent deadlocks when accessing a SQL Server database. What steps do you take to identify the root cause?
What a strong answer covers

Enables deadlock tracing in SQL Server; examines the deadlock graph for involved processes; checks for lock escalation and transaction isolation levels; reviews the application code for long-running transactions; considers indexing strategies to reduce lock contention.

The follow-up you would get

What coding practices can help prevent deadlocks in the first place?

Could you have answered that?
scenario Debugging production issues 2 of 6
A user reports that a feature in your application is returning incorrect results, but it works fine in your local environment. What do you do?
What a strong answer covers

Replicates the user environment to identify discrepancies; checks logs for errors or warnings related to the feature; validates external service responses; inspects data consistency in the production database; considers recent code changes that might have affected the feature.

The follow-up you would get

You discover that the issue is due to a data discrepancy. How do you handle data migrations to ensure consistency?

Could you have answered that?
technical Entity Framework 3 of 6
You notice that Entity Framework's change tracker is consuming high memory when working with large collections, leading to performance degradation. What steps do you take to address this issue?
What a strong answer covers

Examines whether tracking is necessary for all entities; considers using 'AsNoTracking()' for read-only queries; evaluates the use of 'ChangeTracker.Clear()' after processing large batches; investigates using 'BulkInsert' or third-party libraries for large data manipulations.

The follow-up you would get

What are the trade-offs of using 'AsNoTracking()'?

Could you have answered that?
technical Dependency Injection 4 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?
ownership A migration experience 5 of 6
Can you describe a migration you led, such as moving from one database to another or updating a framework version? What were the hurdles?
What a strong answer covers

Describes the migration context and objectives; identifies specific technical hurdles encountered; explains the strategies implemented to address these hurdles; reflects on outcomes and any unforeseen issues; provides insight into team collaboration during the process.

The follow-up you would get

What would you do to better prepare for the migration next time?

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.