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
scenario Debugging 1 of 6
You have an error reported by a user that the application crashes when they try to save a record. Walk me through how you would start investigating this issue.
What a strong answer covers

Reproduces the error with the same input to confirm; checks logs for exceptions and stack traces; inspects the relevant code for validation and error handling; reviews recent changes that might affect save functionality; considers user environment and data integrity issues.

The follow-up you would get

You find a specific input that causes the crash. What additional steps do you take to prevent this issue in the future?

Could you have answered that?
ownership A decision that cost 2 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?
scenario Dependency Injection 3 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?
ownership Asking for help 4 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?
technical Dependency Injection 5 of 6
In your ASP.NET Core application, you have registered a service with a transient lifetime, but you notice that the same instance is being resolved multiple times. How do you troubleshoot this?
What a strong answer covers

Verifies the service registration in the Startup.cs; checks the registration method for accidental singleton or scoped use; inspects the service constructor for static references; considers where and how the service is injected; checks for caching mechanisms that might affect the instance.

The follow-up you would get

What implications does using a singleton have compared to a transient service?

Could you have answered that?
technical LINQ 6 of 6
You have a LINQ query that is unexpectedly returning fewer results than expected. What do you investigate to find out why?
What a strong answer covers

Examines the source data for missing entries; checks the LINQ query syntax for filters or conditions that may exclude results; considers the execution context, such as deferred vs. immediate execution; looks for joins that may lead to data loss; evaluates if any projections are altering the result set.

The follow-up you would get

If the query uses multiple joins, how do you ensure all intended data is included?

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.