<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup" -->

---
title: Vertical Slice vs Clean Architecture in .NET 10 - What I Use
description: Adding a feature to a .NET 10 Web API should touch as few projects as possible without losing protected business rules. A hybrid architecture keeps Domain and...
canonical: https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Vertical Slice vs Clean Architecture in .NET 10 - What I Use | daily.dev
og:description: Adding a feature to a .NET 10 Web API should touch as few projects as possible without losing protected business rules. A hybrid architecture keeps Domain and...
og:url: https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup
og:image: https://api.daily.dev/og/posts/BXZzZFguP.png
og:image:alt: Vertical Slice vs Clean Architecture in .NET 10 - What I Use
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Vertical Slice vs Clean Architecture in .NET 10 - What I Use

**[Code with Mukesh](https://daily.dev/sources/codewithmukesh)** · [@iammukeshm](https://daily.dev/iammukeshm) · 15 min read · 13 upvotes · 0 comments

## Summary

Adding a feature to a .NET 10 Web API should touch as few projects as possible without losing protected business rules. A hybrid architecture keeps Domain and Infrastructure projects from Clean Architecture, drops the Application project, and puts each feature's endpoint, request, validator and handler into one file inside the Api project. Counting files to add one endpoint: 5 across 3 projects in Clean Architecture, 2 in vertical slices, just 1 in the hybrid. Building the same CRUD entity took about 25 minutes in Clean Architecture versus 8 minutes in vertical slices. Four NetArchTest checks, built with NetArchTest 1.3.2 and xUnit v3, enforce that Domain stays dependency-free and that feature folders don't reference each other.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://codewithmukesh.com/blog/clean-architecture-vs-vertical-slice-architecture>

## Questions this post answers

### How many files do I need to touch to add one new endpoint in Clean Architecture versus vertical slice architecture in .NET?

Clean Architecture requires touching 5 files across 3 projects (query, handler, repository interface, repository, endpoints file) to add one endpoint. Vertical slice architecture requires 2 files (the feature file and Program.cs). A hybrid approach that keeps Domain and Infrastructure projects but puts features in single files needs only 1 file, or 2 if a new business rule is needed.

_Comparing .NET architecture trade-offs before a refactor is easier with sources like this tracked on daily.dev._

### Do I need MediatR for vertical slice architecture in .NET 10?

No, MediatR is not required for vertical slice architecture in .NET 10. A Minimal API endpoint can call a static handler method directly, since the framework already handles dependency injection and model binding for it. Adding a mediator is only worth it if you want pipeline behaviors such as logging or transactions.

_Developers deciding on .NET API patterns follow practical breakdowns like this via daily.dev._

### Where should shared logic go in a vertical slice or hybrid .NET architecture?

Business rules belong on the Domain entities, never in a Shared folder. The Shared folder should hold only technical code: endpoint registration interfaces like IEndpoint, validation filters, exception handlers, and paging helpers. If a Services folder or class like ProductService appears inside Shared, it signals the feature folders are turning back into layers.

_Teams structuring feature-folder codebases can keep architecture guidance like this on daily.dev._

## Similar posts on daily.dev

- [Feature Slicing vs Clean Architecture in C\#: Which One Should You Use?](https://daily.dev/posts/feature-slicing-vs-clean-architecture-in-c-which-one-should-you-use--lbojcrlma) · We Are .NET · 0 upvotes · 0 comments
- [Where Vertical Slices Fit Inside the Modular Monolith Architecture](https://daily.dev/posts/where-vertical-slices-fit-inside-the-modular-monolith-architecture-tz11rkcko) · Milan Jovanović · 35 upvotes · 0 comments
- [Feature Slice Folder Structure in .NET: Organizing a Real Project](https://daily.dev/posts/feature-slice-folder-structure-in-net-organizing-a-real-project-wvbnptvb4) · We Are .NET · 0 upvotes · 0 comments
- [Vertical Slice Architecture in Node.js: One Folder Per Use Case](https://daily.dev/posts/vertical-slice-architecture-in-node-js-one-folder-per-use-case-a1su2a1gx) · The T-Shaped Dev · 2 upvotes · 0 comments
- [Vertical Slice Architecture: Where Does the Shared Logic Live?](https://daily.dev/posts/vertical-slice-architecture-where-does-the-shared-logic-live--hxzktyqjf) · Milan Jovanović · 80 upvotes · 4 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Vertical Slice vs Clean Architecture in .NET 10 - What I Use","url":"https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup"},"datePublished":"2026-10-29T03:33:31.683Z","dateModified":"2026-10-30T00:00:12.716Z","description":"Adding a feature to a .NET 10 Web API should touch as few projects as possible without losing protected business rules. A hybrid architecture keeps Domain and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/46b7b64579701235a64785c7c31d4ad3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/46b7b64579701235a64785c7c31d4ad3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Code with Mukesh","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Mukesh Murugan","url":"https://daily.dev/iammukeshm","image":"https://lh3.googleusercontent.com/a-/AFdZucr2UBIpOeVTWohK8XKuXPOutNG6hgyQMz7CYj7LEA=s100","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":910}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":13},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,.net","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Code with Mukesh","item":"https://daily.dev/sources/codewithmukesh"},{"@type":"ListItem","position":3,"name":"Vertical Slice vs Clean Architecture in .NET 10 - What I Use"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/vertical-slice-vs-clean-architecture-in-net-10---what-i-use-bxzzzfgup#faq","mainEntity":[{"@type":"Question","name":"How many files do I need to touch to add one new endpoint in Clean Architecture versus vertical slice architecture in .NET?","acceptedAnswer":{"@type":"Answer","text":"Clean Architecture requires touching 5 files across 3 projects (query, handler, repository interface, repository, endpoints file) to add one endpoint. Vertical slice architecture requires 2 files (the feature file and Program.cs). A hybrid approach that keeps Domain and Infrastructure projects but puts features in single files needs only 1 file, or 2 if a new business rule is needed. Comparing .NET architecture trade-offs before a refactor is easier with sources like this tracked on daily.dev."}},{"@type":"Question","name":"Do I need MediatR for vertical slice architecture in .NET 10?","acceptedAnswer":{"@type":"Answer","text":"No, MediatR is not required for vertical slice architecture in .NET 10. A Minimal API endpoint can call a static handler method directly, since the framework already handles dependency injection and model binding for it. Adding a mediator is only worth it if you want pipeline behaviors such as logging or transactions. Developers deciding on .NET API patterns follow practical breakdowns like this via daily.dev."}},{"@type":"Question","name":"Where should shared logic go in a vertical slice or hybrid .NET architecture?","acceptedAnswer":{"@type":"Answer","text":"Business rules belong on the Domain entities, never in a Shared folder. The Shared folder should hold only technical code: endpoint registration interfaces like IEndpoint, validation filters, exception handlers, and paging helpers. If a Services folder or class like ProductService appears inside Shared, it signals the feature folders are turning back into layers. Teams structuring feature-folder codebases can keep architecture guidance like this on daily.dev."}}]}
```

