After 10 years of building enterprise systems, we've settled on Clean Architecture as our standard approach for ASP.NET Core projects.
Layer Structure
We divide every project into four layers: Domain (entities, interfaces, enums), Application (use cases, DTOs, business logic), Infrastructure (EF Core, repositories, external services), and Presentation (controllers, views, API).
Dependency Rule
Dependencies only point inward β the Domain layer knows nothing about Infrastructure. This makes the business logic completely independent of frameworks and databases.
Repository Pattern
We use a generic repository pattern with a Unit of Work to abstract data access. This makes testing easy and allows swapping databases if needed.
Benefits in Practice
When we've needed to swap from SQL Server to PostgreSQL, or add a new API layer to an existing MVC app, the clean architecture made it straightforward.