Interview practice

.NET Developer

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

0–2 years 2–5 years 5–8 years 8+ years
technical Async programming 1 of 6
You have an ASP.NET Core application that uses async/await. A method that should be returning a task of data is returning null intermittently. What steps do you take to investigate this issue?
What a strong answer covers

Checks for exceptions being thrown in the async method; verifies that all awaited tasks are properly awaited; looks for race conditions or shared state issues; examines the calling code for proper handling of async results; considers the impact of thread pool exhaustion.

The follow-up you would get

If exceptions are being thrown, how do you ensure they are logged and handled correctly?

Could you have answered that?
scenario Performance Optimization 2 of 6
Your application is running slower than expected after a recent deployment. What is your approach to identifying the cause?
What a strong answer covers

Starts with performance monitoring tools to gather metrics; identifies slow-running queries and inspects execution plans; assesses recent code changes for performance impacts; checks for unnecessary data loading or processing; evaluates resource usage on Azure.

The follow-up you would get

You identify a particular query is slow. What steps do you take to optimize it?

Could you have answered that?
ownership Asking for help 3 of 6
Can you describe a situation where you were stuck on a problem and how you sought help?
What a strong answer covers

Details the specific problem and its context; explains the reasoning behind reaching out for assistance; names the resources or individuals consulted and why; describes the outcome of the interaction and any changes made based on the feedback received; reflects on the learning gained from the experience.

The follow-up you would get

What would you consider before asking for help next time?

Could you have answered that?
ownership A decision that cost 4 of 6
Describe a time when you made a decision about a database design that later proved to be ineffective.
What a strong answer covers

Identifies a specific design choice, explains the context and constraints; mentions the signs that indicated issues, such as performance degradation or data integrity problems; describes the re-evaluation process and changes made; explains the impact of the decision on the project, including time and resource costs; avoids attributing blame to others.

The follow-up you would get

What would you do differently if faced with the same decision again?

Could you have answered that?
technical Entity Framework 5 of 6
You notice that changes made to an entity in Entity Framework are not being saved to the database. What do you investigate first to identify the issue?
What a strong answer covers

Checks if the DbContext is being tracked correctly; verifies that changes are being made to a tracked entity; confirms that SaveChanges() is being called; looks for validation errors that could prevent saving; examines if the transaction scope is affecting the commit.

The follow-up you would get

What would you do if SaveChanges() is being called but still no changes are saved?

Could you have answered that?
scenario Dependency Injection 6 of 6
During testing, you find that a singleton service is unexpectedly holding state across multiple requests. How do you investigate this?
What a strong answer covers

Verifies the service registration and lifetime in the Startup class; checks instantiation logic for shared state; inspects the code for static fields or properties; reviews where and how the service is being used; considers isolating the state within the service.

The follow-up you would get

What would you change in your service design to prevent this issue?

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.