📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

Senior-Level Architecture

Choosing an architecture from business needs, avoiding over-engineering, modular monolith before microservices, data ownership, transaction and deployment boundaries, API contracts, documenting architecture and migration strategy.

  1. What is a quality attribute scenario, and how do you turn one into a fitness function that runs in CI?
    Mid-Level Theory Senior-Level Architecture
  2. How do you tell essential complexity from accidental complexity in an existing .NET system?
    Senior Architecture Senior-Level Architecture
  3. How does a consumer-driven contract test differ from an end-to-end integration test, and when would you use each?
    Senior Theory Senior-Level Architecture
  4. How do you choose an architecture for a new .NET system from the business needs rather than from fashion? Explain quality attributes (scalability, availability, modifiability, cost), constraints, team size and skills, and how you turn them into a decision you can defend.

    Choosing an architecture by ranking quality attributes, capturing constraints and team realities, mapping them to options with a decision table, and recording the choice in an ADR.

    Mid-Level Theory Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  5. How do you avoid over-engineering at the architecture level? What are the warning signs in a .NET system, how do you separate reversible from irreversible decisions, and how do you push back on "we need to build it like Netflix" without blocking real future needs?

    Architecture-level over-engineering: warning signs, one-way vs two-way door decisions, last responsible moment, keeping options open, and how to argue against premature scale.

    Senior Architecture Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  6. Your team runs a modular monolith and some people want to move to microservices. How do you decide whether and when to split, which module to extract first, and how do you extract it safely without a big-bang rewrite?

    Modular monolith first: the criteria for splitting a module out, choosing the first candidate, and the step-by-step extraction (contract, data, traffic switch) with rollback.

    Senior Architecture Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  7. What does data ownership mean in a modular or service-based .NET architecture? Explain database per service (or schema per module), why shared writes are dangerous, how you meet reporting and cross-cutting query needs, and how you duplicate and synchronise data safely.

    Data ownership: one owner per piece of data, database per service vs schema per module, no shared writes, reporting via read models or a warehouse, and synchronising copies with events and the outbox.

    Senior Theory Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  8. Where do you draw transaction boundaries when a business operation spans several modules or services? Explain why you keep local transactions small, when you use a saga or eventual consistency instead, and how you design what the user sees while the operation is still in progress.

    Transaction boundaries across modules and services: one aggregate or module per local transaction, sagas and process managers, compensation, eventual consistency and the UX of pending states.

    Senior Theory Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  9. What is the difference between a logical boundary and a deployment boundary in a .NET system? Explain independent deployability, how shared libraries and versioning can quietly couple deployables, and how monorepos and polyrepos affect this.

    Logical vs deployment boundaries: modules vs deployables, independent deployability, shared NuGet libraries and versioning, and the monorepo vs polyrepo trade-off.

    Mid-Level Theory Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  10. How do you design the API contracts between modules and between services? Explain when you choose synchronous calls vs asynchronous messages, who owns a contract, how consumer-driven contract tests work, and how you version contracts without breaking consumers.

    Contracts between modules and services: sync vs async, provider vs consumer ownership, consumer-driven contract testing with Pact, and backward-compatible versioning.

    Senior Theory Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  11. How do you document and communicate the architecture of a .NET system so it stays useful? Explain Architecture Decision Records, the C4 model, and how fitness functions keep the real system aligned with the documented architecture.

    Documenting architecture: ADRs (format, lifecycle, where they live), C4 diagrams as code, and fitness functions (architecture tests, performance and dependency checks) that keep docs and code aligned.

    Senior Architecture Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  12. You own a large ASP.NET MVC 5 / .NET Framework 4.8 monolith that the business depends on, and you're asked to move it to .NET 10 and a modern architecture without stopping feature work. How do you plan the migration with the strangler fig pattern and YARP, slice it into increments, handle shared auth, session and data, and measure progress?

    Incremental migration of a .NET Framework monolith to .NET 10: strangler fig with a YARP front, System.Web adapters for shared auth and session, choosing slices, data strategy, and measuring progress.

    Senior RealWorldScenario Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  13. Leadership has decided to split your company's .NET monolith into 15 microservices within six months, and asks you to lead it. The monolith works, there are four teams, and there is no platform team. How do you respond, what data do you gather, and what do you propose instead, including how you'd record and sell the decision?

    Responding to a top-down microservices mandate: uncovering the real goals, gathering evidence (DORA, coupling, cost), proposing a modular-monolith-first plan with targeted extractions, and using an ADR and stakeholder framing to win support.

    Staff / Architect Architecture Senior-Level Architecture Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me