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

Application Architectures

N-tier and layered, Clean, Onion, Hexagonal (ports and adapters), Vertical Slice, modular monolith, microservices and service-oriented architecture, and enforcing boundaries with architecture tests.

  1. What is software architecture? Explain the difference between N-tier (physical) and layered (logical) architecture, and walk me through the classic three-layer .NET application.

    Defines software architecture, separates physical tiers from logical layers, and explains the presentation, business logic and data access layers of a classic three-layer .NET application.

    Beginner Theory Application Architectures Β· πŸ”— 3 follow-ups
  2. In a layered architecture, what are the dependency rules between layers, and what problems usually appear as the system grows? Explain strict vs relaxed layering, database-centric design and leaky layers.

    Covers the dependency rules of layered architecture, strict versus relaxed layering, and the common failure modes: database-centric design, leaky layers, pass-through layers and the anaemic domain.

    Junior Theory Application Architectures Β· πŸ”— 3 follow-ups
  3. Explain Clean Architecture. What goes in the Domain, Application, Infrastructure and Presentation layers, what is the dependency rule, and what does a typical .NET 10 solution layout look like?

    Explains Clean Architecture's four layers, the dependency rule and dependency inversion that make the domain independent of infrastructure, and a typical .NET 10 solution layout with its trade-offs.

    Intermediate Theory Application Architectures Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  4. Onion, Hexagonal (ports and adapters) and Clean Architecture: are they the same idea or not? Explain what each emphasises, what ports and adapters look like in a .NET service, and where driving and driven adapters live.

    Compares Onion, Hexagonal and Clean Architecture, explains their shared dependency-inversion core and different emphases, and shows driving and driven ports and adapters in a .NET 10 service.

    Mid-Level Theory Application Architectures Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  5. What is Vertical Slice Architecture? Explain feature folders and one handler per use case, how cross-cutting concerns and shared code are handled, and the trade-offs compared with Clean Architecture.

    Explains Vertical Slice Architecture: organising by feature with one handler per request, handling cross-cutting concerns and shared domain logic, and comparing its trade-offs with Clean Architecture.

    Mid-Level Theory Application Architectures Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  6. What is a modular monolith? Explain modules that own their data or schema, how modules talk to each other through internal APIs or events, and how you enforce boundaries in a single .NET deployable.

    Explains the modular monolith: business-aligned modules with their own schema, communication through public contracts or in-process events, boundary enforcement in .NET, and when it beats both a classic monolith and microservices.

    Intermediate Theory Application Architectures Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  7. What are microservices? Describe their defining characteristics, the benefits they bring, the costs they impose (the distributed systems tax), and how you decide whether they fit a given organisation and system.

    Defines microservices by their characteristics (independent deployability, data ownership, business alignment), weighs benefits against the operational and consistency costs, and gives criteria for when they fit.

    Mid-Level Theory Application Architectures Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  8. How does service-oriented architecture (SOA) differ from microservices? Explain enterprise service buses, contracts, service granularity and data sharing, and what changed between the SOA era and today.

    Compares SOA and microservices: ESBs versus smart endpoints and dumb pipes, WSDL/SOAP versus lightweight contracts, granularity, shared versus owned data, governance, and what the industry learned.

    Intermediate Theory Application Architectures Β· πŸ”— 1 follow-ups Β· πŸ›  1 real-world
  9. How do you enforce architecture rules automatically in a .NET 10 solution? Show architecture tests with NetArchTest or ArchUnitNET, and explain how project references, internal visibility and analysers fit in.

    Shows how to make architecture rules executable in .NET: project references, internal visibility, architecture tests with NetArchTest or ArchUnitNET, Roslyn analysers and banned APIs, and how to roll them out in CI.

    Senior Coding Application Architectures Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  10. Code review: a team calls this solution "Clean Architecture". The domain entities are property bags, the Application project references Infrastructure, there's a repository per table, each request is mapped through four DTO types, and every class has a one-implementation interface. What do you flag, in what order, and what does the rewrite look like?

    A code review of a cargo-cult Clean Architecture solution: anaemic entities, a broken dependency rule, table-shaped repositories, mapping chains and needless interfaces, ranked by severity with a rewrite and review close-out.

    Senior CodeReview Application Architectures Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  11. You're asked to choose an architecture for three new .NET systems: a CRUD-heavy internal admin app, a complex insurance-policy administration domain, and a high-scale payments platform. Which architecture do you pick for each, and how do you justify and record those choices?

    A staff-level architecture decision across three contrasting systems, matching layered or vertical slice, modular monolith with DDD, and selective services with event-driven integration to domain complexity, scale, team and compliance needs, recorded in ADRs.

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

🌐 Sangam's Webring

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