2–5 years · Mid — C# · ASP.NET Core · Entity Framework · SQL Server · LINQ · Azure
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.
What coding practices can help prevent deadlocks in the first place?
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.
You discover that the issue is due to a data discrepancy. How do you handle data migrations to ensure consistency?
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.
What are the trade-offs of using 'AsNoTracking()'?
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.
What are the implications of sharing state in a singleton service?
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.
What would you do to better prepare for the migration next time?
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.
What would you approach differently if given another chance?
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.