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.
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
In Domain-Driven Design, how would you implement domain event dispatch with EF Core so the domain event handlers run in the same transaction as the aggregate change?
Intermediate
Theory
Architecture Patterns
-
What is the difference between a domain event and an integration event? Explain in-process versus cross-service delivery, when each should be dispatched relative to SaveChanges, and how the transactional outbox connects the two.
Domain events versus integration events in a .NET 10 architecture: scope, contracts, dispatch timing around EF Core SaveChanges, translating one into the other, and using the outbox for reliable cross-service publishing.
Intermediate
Theory
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world
-
Show me how you would implement domain events with EF Core 10: collecting them on aggregates, dispatching them from a SaveChangesInterceptor, and keeping the handlers' changes consistent with the original save. What can go wrong?
A working EF Core 10 implementation of domain events: an aggregate base class, a SaveChangesInterceptor that collects and dispatches events before commit, transaction and execution-strategy handling, and the failure modes such as recursion, lost events and re-entrancy.
Mid-Level
Coding
Architecture Patterns
Β· π 4 follow-ups Β· π 1 real-world
-
What is event sourcing? Explain storing events instead of current state, how projections and snapshots work, how you version events, and when event sourcing is worth its cost and when it is not.
Event sourcing at the architecture level: the event store and streams, rebuilding aggregates, projections and read models, snapshots, event schema evolution and upcasting, .NET tooling (Marten, KurrentDB, Eventuous), and the criteria for using or avoiding it.
Senior
Theory
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world
-
You're designing a system where reads outnumber writes 50 to 1 and the read screens need data from several modules. How would you apply CQRS at the architecture level: separate read stores, projections, handling eventual consistency in the UX, and deciding whether you also need event sourcing?
Architecture-level CQRS for a read-heavy .NET system: the spectrum from split handlers to separate read stores, building projections from events or change feeds, choosing the read store, designing UX for eventual consistency, and why CQRS does not require event sourcing.
Senior
Architecture
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world
-
Your team is starting a vertical-slice .NET 10 codebase and someone proposes MediatR for every request. How do you evaluate whether you need a mediator at all? Cover the cost of indirection, pipeline behaviours versus ASP.NET Core filters, MediatR's licence change, and how you would move an existing codebase off it.
An architecture decision on mediators in .NET 10: what MediatR gives a vertical-slice codebase, the indirection and performance costs, built-in alternatives (endpoint filters, direct handler injection), source-generated and Wolverine alternatives, MediatR's commercial licensing as of late 2026, and an incremental migration plan.
Senior
Architecture
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world
-
In a Clean Architecture .NET solution, where do the Repository, Unit of Work and Specification abstractions live, and how do you use them without leaking EF Core into the Application and Domain layers? When would you skip them and use DbContext directly?
Architecture-level placement of Repository, Unit of Work and Specification in Clean Architecture: interfaces in Domain or Application, implementations in Infrastructure, one repository per aggregate, DbContext as the unit of work, avoiding IQueryable and EF types in the core, and when using DbContext directly is the better choice.
Mid-Level
Theory
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world
-
How do you design and evolve integration event contracts between .NET services? Explain schema versioning, the CloudEvents envelope, who owns a contract, and why a shared NuGet library of event classes used by every service causes coupling.
Integration event contracts in a .NET service landscape: publisher ownership, backward- and forward-compatible schema changes, versioned event types, the CloudEvents envelope and Azure Service Bus mapping, schema registries and contract tests, and the coupling caused by a shared events library.
Mid-Level
Theory
Architecture Patterns
Β· π 2 follow-ups Β· π 1 real-world
-
Walk me through an end-to-end order flow across Ordering, Payment and Inventory services that uses the outbox, the inbox and an orchestrated saga. At each step, what happens if a service crashes, a message is duplicated, or a reply never arrives?
An architecture walkthrough of a cross-service order flow in .NET: outbox publishing, inbox deduplication, a persisted saga orchestrator with compensations and timeouts, and a failure-point analysis covering crashes, duplicates, lost replies and poison messages.
Senior
Architecture
Architecture Patterns
Β· π 3 follow-ups Β· π 1 real-world