📁 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.

Phase 15 — Architecture

Choosing and evolving the architecture of .NET systems: layered, Clean, hexagonal, vertical slice, modular monolith and microservices; architecture-level patterns such as CQRS, events and sagas; Domain-Driven Design; and the senior judgement to match architecture to business needs.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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