<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Ardalis Clean Architecture</title><link>https://129ff325.cleanarchitecture.pages.dev/</link><description>Recent content in Introduction on Ardalis Clean Architecture</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://129ff325.cleanarchitecture.pages.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>About ADRs</title><link>https://129ff325.cleanarchitecture.pages.dev/architecture-decisions/about-adrs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/architecture-decisions/about-adrs/</guid><description>&lt;h1 id="architecture-decision-records-adr"&gt;Architecture Decision Records (ADR)&lt;a class="anchor" href="#architecture-decision-records-adr" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="what-is-an-architecture-decision-record-adr"&gt;What is an Architecture Decision Record (ADR)?&lt;a class="anchor" href="#what-is-an-architecture-decision-record-adr" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An Architecture Decision Record (ADR) documents significant architecture decisions made throughout a project, capturing the context, rationale, and consequences of each decision. This promotes transparency and provides a historical reference for future design considerations.&lt;/p&gt;
&lt;h2 id="purpose-of-adrs"&gt;Purpose of ADRs&lt;a class="anchor" href="#purpose-of-adrs" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Knowledge Management&lt;/strong&gt;: Consolidates architectural knowledge and decisions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;: Enhances team communication by documenting discussions and outcomes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clarity&lt;/strong&gt;: Provides clear reasoning behind design choices, making it easier for new team members to understand past decisions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="best-practices-for-writing-adrs"&gt;Best Practices for Writing ADRs&lt;a class="anchor" href="#best-practices-for-writing-adrs" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Be Specific&lt;/strong&gt;: Each ADR should address a single architectural decision. Avoid conflating multiple decisions into one record.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Document Context&lt;/strong&gt;: Clearly explain the project’s context and relevant considerations that influenced the decision. Include team dynamics and priorities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rationale and Consequences&lt;/strong&gt;: Describe the reasons for the decision, including pros and cons, and outline the implications of the decision for the project and future architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Immutable Records&lt;/strong&gt;: Once an ADR is created, avoid altering it. Instead, create a new ADR to reflect any changes or updates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timestamp Entries&lt;/strong&gt;: Include timestamps to track when each decision was made, especially for aspects that may evolve over time (e.g., costs, schedules).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use Templates&lt;/strong&gt;: Utilize established templates for consistency and completeness in documenting ADRs.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="versioning-adrs"&gt;Versioning ADRs&lt;a class="anchor" href="#versioning-adrs" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Track Changes&lt;/strong&gt;: Each time an ADR is updated or a new version is created, increment the version number (e.g., &lt;code&gt;v1.0&lt;/code&gt;, &lt;code&gt;v1.1&lt;/code&gt;, etc.) to reflect changes clearly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Document Changes&lt;/strong&gt;: Include a &amp;ldquo;Changelog&amp;rdquo; section in the ADR to summarize what has changed in each version. This can include updates to the rationale, context, or decision consequences.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintain Clarity&lt;/strong&gt;: Ensure the latest version is easily accessible while keeping older versions for reference. You might consider using a version control system (e.g., Git) to manage this effectively.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-to-start-using-adrs"&gt;How to Start Using ADRs&lt;a class="anchor" href="#how-to-start-using-adrs" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identify Decisions&lt;/strong&gt;: Collaborate with your team to identify significant architecture decisions that need documentation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Select a Tool&lt;/strong&gt;: Choose a tool for documenting ADRs (e.g., markdown files in a Git repository, Google Docs, project management tools).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create ADRs&lt;/strong&gt;: For each decision, create an ADR file in the &lt;code&gt;adr&lt;/code&gt; directory, following naming conventions (e.g., &lt;code&gt;choose-database.md&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="file-name-conventions"&gt;File Name Conventions&lt;a class="anchor" href="#file-name-conventions" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use a present tense imperative verb phrase.&lt;/li&gt;
&lt;li&gt;Separate words with lowercase letters and dashes.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;.md&lt;/code&gt; extension for markdown formatting.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="templates"&gt;Templates&lt;a class="anchor" href="#templates" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Refer to the following templates for structuring your ADRs:&lt;/p&gt;</description></item><item><title>Clean Architecture (clean-arch)</title><link>https://129ff325.cleanarchitecture.pages.dev/templates/clean-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/templates/clean-architecture/</guid><description>&lt;h1 id="clean-architecture-template-clean-arch"&gt;Clean Architecture Template (&lt;code&gt;clean-arch&lt;/code&gt;)&lt;a class="anchor" href="#clean-architecture-template-clean-arch" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new install Ardalis.CleanArchitecture.Template
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new clean-arch -o Your.ProjectName&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The full template generates a multi-project solution where each layer is its own project, so the compiler enforces which layers may depend on which.&lt;/p&gt;
&lt;h2 id="solution-structure"&gt;Solution structure&lt;a class="anchor" href="#solution-structure" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Your.ProjectName/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── src/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.Core/ Domain model: aggregates, value objects, events, specifications, interfaces
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.UseCases/ Application layer: commands, queries, and their handlers (CQRS)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.Infrastructure/ EF Core, repositories, query services, email
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.Web/ ASP.NET Core host: FastEndpoints API, DI and middleware configuration
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.AspireHost/ .NET Aspire app host: SQL Server and Papercut SMTP containers
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── Your.ProjectName.ServiceDefaults/ Aspire service defaults: OpenTelemetry, health checks, resilience
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── tests/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.UnitTests/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.IntegrationTests/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.FunctionalTests/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── Your.ProjectName.AspireTests/ Placeholder for Aspire tests (not in the .slnx by default)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Directory.Build.props Target framework, nullable, warnings as errors, Central Package Management
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Directory.Packages.props Every NuGet package version, in one place
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── global.json .NET SDK version
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── nuget.config Package sources (nuget.org)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── .runsettings Parallel test execution settings
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└── Your.ProjectName.slnx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="project-dependencies"&gt;Project dependencies&lt;a class="anchor" href="#project-dependencies" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Dependencies point inward, toward Core. Core depends on no other project in the solution.&lt;/p&gt;</description></item><item><title>v11 to v12</title><link>https://129ff325.cleanarchitecture.pages.dev/migration-guides/v11-to-v12/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/migration-guides/v11-to-v12/</guid><description>&lt;h1 id="upgrading-from-template-v11x-to-v12x"&gt;Upgrading from template v11.x to v12.x&lt;a class="anchor" href="#upgrading-from-template-v11x-to-v12x" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;blockquote class='book-hint important'&gt;
&lt;p&gt;These are &lt;strong&gt;template versions&lt;/strong&gt;, not .NET versions. Template &lt;strong&gt;v11.x targets .NET 10&lt;/strong&gt;. Template &lt;strong&gt;v12.x targets .NET 11&lt;/strong&gt;. See &lt;a href="https://129ff325.cleanarchitecture.pages.dev/versions/"&gt;Versions&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This guide is for solutions generated from &lt;code&gt;Ardalis.CleanArchitecture.Template&lt;/code&gt; 11.x (for example 11.1.1), or from &lt;code&gt;Ardalis.MinimalClean.Template&lt;/code&gt; 1.x, that want to adopt the changes in 12.x. A section at the end covers the &lt;a href="#minimal-clean-template"&gt;Minimal Clean template&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Compared with v10 to v11, this is a smaller upgrade: a new .NET version, package updates (several of them major versions), a fix to how strongly typed IDs are generated, and the move to xUnit v3. The API endpoints and domain model are otherwise unchanged, and the only use case change is a rename.&lt;/p&gt;</description></item><item><title>Minimal Clean (min-clean)</title><link>https://129ff325.cleanarchitecture.pages.dev/templates/minimal-clean/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/templates/minimal-clean/</guid><description>&lt;h1 id="minimal-clean-architecture-template-min-clean"&gt;Minimal Clean Architecture Template (&lt;code&gt;min-clean&lt;/code&gt;)&lt;a class="anchor" href="#minimal-clean-architecture-template-min-clean" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new install Ardalis.MinimalClean.Template
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new min-clean -o Your.ProjectName&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="overview"&gt;Overview&lt;a class="anchor" href="#overview" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Minimal Clean Architecture&lt;/strong&gt; template takes a simplified, pragmatic approach to Clean Architecture for ASP.NET Core applications. It keeps the core principles (separation of concerns, dependency inversion, and testability) while reducing complexity by putting the application in a single project organized into vertical slices (Vertical Slice Architecture, or VSA).&lt;/p&gt;
&lt;h2 id="philosophy"&gt;Philosophy&lt;a class="anchor" href="#philosophy" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="core-principles"&gt;Core principles&lt;a class="anchor" href="#core-principles" aria-label="Link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Simplicity first&lt;/strong&gt;: minimize unnecessary abstractions and project boundaries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical slices&lt;/strong&gt;: organize by feature rather than by technical layer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pragmatic DDD&lt;/strong&gt;: use domain patterns where they add value, not everywhere&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Progressive enhancement&lt;/strong&gt;: start simple, and add complexity only when it&amp;rsquo;s needed&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="clean-architecture-principles-it-keeps"&gt;Clean Architecture principles it keeps&lt;a class="anchor" href="#clean-architecture-principles-it-keeps" aria-label="Link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Dependency inversion&lt;/strong&gt;: the domain doesn&amp;rsquo;t depend on infrastructure&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Testability&lt;/strong&gt;: business logic can be tested in isolation&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Separation of concerns&lt;/strong&gt;: clear boundaries between domain, features, and infrastructure&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Framework independence&lt;/strong&gt;: domain logic isn&amp;rsquo;t coupled to ASP.NET Core&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="what-it-simplifies-compared-to-the-full-template"&gt;What it simplifies compared to the full template&lt;a class="anchor" href="#what-it-simplifies-compared-to-the-full-template" aria-label="Link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Single project&lt;/strong&gt;: application code lives in one Web project instead of four or more&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fewer patterns&lt;/strong&gt;: essential DDD patterns (aggregates, strongly typed IDs, a few value objects, specifications), without the full catalog&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Colocated use cases&lt;/strong&gt;: each feature folder holds its endpoint &lt;em&gt;and&lt;/em&gt; its Mediator command or query handler; simple endpoints can skip Mediator entirely&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical organization&lt;/strong&gt;: group by feature (products, cart) instead of by layer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No test projects&lt;/strong&gt;: add the ones you need (see &lt;a href="#testing-strategy"&gt;Testing strategy&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="solution-structure"&gt;Solution structure&lt;a class="anchor" href="#solution-structure" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Your.ProjectName/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── src/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.Web/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Domain/ Domain layer
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── CartAggregate/ Cart (aggregate root), CartItem, CartId, specifications
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── GuestUserAggregate/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── OrderAggregate/ Order, OrderItem, Price and Quantity value objects
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── ProductAggregate/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ └── Interfaces/ IEmailSender
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── CartFeatures/ Vertical slices for the cart
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── AddToCart/ AddToCartEndpoint + AddToCartHandler (command)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── Checkout/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── GetById/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── CartDto.cs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ └── CartResponse.cs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── ProductFeatures/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── Create/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── GetById/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ └── List/ Endpoint, handler, and IListProductsQueryService
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Infrastructure/ Infrastructure layer
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── Data/ AppDbContext, EfRepository, Config/, Migrations/, Queries/, SeedData
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ └── Email/ MimeKitEmailSender, FakeEmailSender
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Configurations/ Logger, Mediator, middleware, options, and service registration
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── config.nsdepcop Namespace dependency rules, checked at build time
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ └── Program.cs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Your.ProjectName.AspireHost/ .NET Aspire app host (SQL Server + Papercut SMTP containers)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── Your.ProjectName.ServiceDefaults/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Directory.Build.props
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Directory.Packages.props
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── global.json
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└── Your.ProjectName.slnx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="vertical-slice-organization"&gt;Vertical slice organization&lt;a class="anchor" href="#vertical-slice-organization" aria-label="Link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each feature folder (&lt;code&gt;CartFeatures&lt;/code&gt;, &lt;code&gt;ProductFeatures&lt;/code&gt;) contains one sub-folder per use case. A use-case folder holds everything for that operation: the FastEndpoints endpoint with its request type and validator, and the Mediator command or query with its handler. The domain types the feature works with live in &lt;code&gt;Domain/&lt;/code&gt;, and the EF Core mappings for them live in &lt;code&gt;Infrastructure/Data/Config/&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>v10 to v11</title><link>https://129ff325.cleanarchitecture.pages.dev/migration-guides/v10-to-v11/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/migration-guides/v10-to-v11/</guid><description>&lt;h1 id="upgrading-from-template-v10x-to-v11x"&gt;Upgrading from template v10.x to v11.x&lt;a class="anchor" href="#upgrading-from-template-v10x-to-v11x" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;blockquote class='book-hint important'&gt;
&lt;p&gt;These are &lt;strong&gt;template versions&lt;/strong&gt;, not .NET versions. Template &lt;strong&gt;v10.x targets .NET 9&lt;/strong&gt;. Template &lt;strong&gt;v11.x targets .NET 10&lt;/strong&gt;. See &lt;a href="https://129ff325.cleanarchitecture.pages.dev/versions/"&gt;Versions&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;If you started your project with version &lt;code&gt;10.x&lt;/code&gt; of the template (for example 10.1.1) and want to incorporate the architectural changes of version &lt;code&gt;11.0.0&lt;/code&gt;, follow this guide. If you&amp;rsquo;re going on to v12, follow the &lt;a href="https://129ff325.cleanarchitecture.pages.dev/migration-guides/v11-to-v12/"&gt;v11 to v12 guide&lt;/a&gt; afterward.&lt;/p&gt;
&lt;h2 id="the-diff-strategy"&gt;The diff strategy&lt;a class="anchor" href="#the-diff-strategy" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Since this template serves as a starting point, the most reliable way to upgrade an existing project is to compare freshly generated solutions:&lt;/p&gt;</description></item><item><title>ADR 001: Replace Autofac with .NET DI</title><link>https://129ff325.cleanarchitecture.pages.dev/architecture-decisions/adr-001-dotnet-di-adoption/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/architecture-decisions/adr-001-dotnet-di-adoption/</guid><description>&lt;h1 id="adr-001-replace-autofac-with-net-core-dependency-injection"&gt;ADR 001: Replace Autofac with .NET Core Dependency Injection&lt;a class="anchor" href="#adr-001-replace-autofac-with-net-core-dependency-injection" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="status"&gt;Status&lt;a class="anchor" href="#status" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Accepted&lt;/p&gt;
&lt;h2 id="context"&gt;Context&lt;a class="anchor" href="#context" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Initially, this repository employed Autofac for dependency injection. At the time of adoption, Autofac was preferred due to its robust feature set, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Support for advanced scenarios such as decorators and modules, which could be placed close to their corresponding implementations.&lt;/li&gt;
&lt;li&gt;A well-established history of stability and maturity, having been used in various projects before .NET Core&amp;rsquo;s built-in DI was fully featured.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As the .NET ecosystem evolved, the built-in DI container began to meet the needs of our project without introducing the added complexity associated with Autofac. The .NET DI framework has matured significantly, offering sufficient functionality for typical use cases, including:&lt;/p&gt;</description></item><item><title>Getting Started</title><link>https://129ff325.cleanarchitecture.pages.dev/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/getting-started/</guid><description>&lt;h1 id="getting-started"&gt;Getting Started&lt;a class="anchor" href="#getting-started" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This page takes you from nothing to a running API. The recommended way to use either template is the &lt;code&gt;dotnet new&lt;/code&gt; CLI.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;.NET SDK&lt;/strong&gt; matching the template version. Template v12.x targets &lt;strong&gt;.NET 11&lt;/strong&gt; (&lt;code&gt;global.json&lt;/code&gt; pins SDK &lt;code&gt;11.0.100&lt;/code&gt; and rolls forward to newer SDKs). Older template versions target older SDKs; see &lt;a href="https://129ff325.cleanarchitecture.pages.dev/versions/"&gt;Versions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Docker&lt;/strong&gt; (or another container runtime supported by .NET Aspire) to run through the Aspire host. The full template&amp;rsquo;s functional tests also use it to test against SQL Server, and fall back to SQLite without it. You can build, run the Web project directly, and run all the tests without Docker.&lt;/li&gt;
&lt;li&gt;An editor: Visual Studio, JetBrains Rider, or VS Code with the C# Dev Kit.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="1-install-the-templates"&gt;1. Install the templates&lt;a class="anchor" href="#1-install-the-templates" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Install one or both templates from NuGet:&lt;/p&gt;</description></item><item><title>Running the Application</title><link>https://129ff325.cleanarchitecture.pages.dev/running/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/running/</guid><description>&lt;h1 id="running-the-application"&gt;Running the Application&lt;a class="anchor" href="#running-the-application" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Both templates can run two ways: through the &lt;strong&gt;.NET Aspire host&lt;/strong&gt; (recommended, needs Docker), or by running the &lt;strong&gt;Web project directly&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="option-1-run-with-net-aspire-recommended"&gt;Option 1: run with .NET Aspire (recommended)&lt;a class="anchor" href="#option-1-run-with-net-aspire-recommended" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet run --project src/Your.ProjectName.AspireHost&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or set the &lt;code&gt;AspireHost&lt;/code&gt; project as the startup project in Visual Studio or Rider and press F5. &lt;code&gt;aspire run&lt;/code&gt; from the solution folder works too (in the full template, &lt;code&gt;aspire.config.json&lt;/code&gt; points it at the app host).&lt;/p&gt;</description></item><item><title>Data &amp; Migrations</title><link>https://129ff325.cleanarchitecture.pages.dev/data-and-migrations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/data-and-migrations/</guid><description>&lt;h1 id="data--migrations"&gt;Data &amp;amp; Migrations&lt;a class="anchor" href="#data--migrations" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Both templates use Entity Framework Core. You shouldn&amp;rsquo;t need to do anything here to &lt;em&gt;run&lt;/em&gt; a new solution, because startup creates or migrates the database for you in Development (see &lt;a href="https://129ff325.cleanarchitecture.pages.dev/running/#migrations-and-seed-data-at-startup"&gt;Running the Application&lt;/a&gt;). Read on when you change the model.&lt;/p&gt;
&lt;h2 id="install-the-ef-core-tools"&gt;Install the EF Core tools&lt;a class="anchor" href="#install-the-ef-core-tools" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet tool install --global dotnet-ef
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8b949e;font-style:italic"&gt;# or update an existing install&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet tool update --global dotnet-ef&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="full-template"&gt;Full template&lt;a class="anchor" href="#full-template" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;AppDbContext&lt;/code&gt; and migrations live in the &lt;strong&gt;Infrastructure&lt;/strong&gt; project (&lt;code&gt;Data/Migrations&lt;/code&gt;), while the &lt;strong&gt;Web&lt;/strong&gt; project is the startup project that supplies configuration. Specify both when you run EF Core commands.&lt;/p&gt;</description></item><item><title>Building &amp; Testing</title><link>https://129ff325.cleanarchitecture.pages.dev/testing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/testing/</guid><description>&lt;h1 id="building--testing"&gt;Building &amp;amp; Testing&lt;a class="anchor" href="#building--testing" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This page covers building and testing a solution generated from either template. The full template (&lt;code&gt;clean-arch&lt;/code&gt;) includes three test projects. MinimalClean (&lt;code&gt;min-clean&lt;/code&gt;) has no test projects; see &lt;a href="https://129ff325.cleanarchitecture.pages.dev/templates/minimal-clean/#testing-strategy"&gt;its testing strategy&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;.NET SDK&lt;/strong&gt;: template v12.x needs the .NET 11 SDK. &lt;code&gt;global.json&lt;/code&gt; pins &lt;code&gt;11.0.100&lt;/code&gt; with &lt;code&gt;rollForward: latestMajor&lt;/code&gt; and &lt;code&gt;allowPrerelease: true&lt;/code&gt;, so any newer SDK also works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Docker&lt;/strong&gt; (optional): the functional tests run against SQL Server in a container when Docker can run Linux containers, and fall back to SQLite when it can&amp;rsquo;t. The Aspire host also needs Docker.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="build"&gt;Build&lt;a class="anchor" href="#build" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet build &lt;span style="color:#8b949e;font-style:italic"&gt;# from the solution folder&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet build Your.ProjectName.slnx -c Release&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Solution-wide build settings live in &lt;code&gt;Directory.Build.props&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Goals &amp; Design Decisions</title><link>https://129ff325.cleanarchitecture.pages.dev/design-decisions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/design-decisions/</guid><description>&lt;h1 id="goals--design-decisions"&gt;Goals &amp;amp; Design Decisions&lt;a class="anchor" href="#goals--design-decisions" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="goals"&gt;Goals&lt;a class="anchor" href="#goals" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The goal of this repository is to provide a basic solution structure that can be used to build Domain-Driven Design (DDD)-based or simply well-factored, SOLID applications using .NET. Learn more about these topics here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/csharp-solid-principles"&gt;SOLID Principles for C# Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/fundamentals-domain-driven-design"&gt;Domain-Driven Design Fundamentals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/refactoring-solid-c-sharp-code"&gt;Refactoring to SOLID C# Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;re used to building applications as a single project, or as a set of projects that follow the traditional UI → Business Layer → Data Access Layer &amp;ldquo;N-Tier&amp;rdquo; architecture, I recommend you check out these two courses (ideally before DDD Fundamentals):&lt;/p&gt;</description></item><item><title>Enforcing Dependency Rules</title><link>https://129ff325.cleanarchitecture.pages.dev/dependency-rules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/dependency-rules/</guid><description>&lt;h1 id="enforcing-dependency-rules-with-nsdepcop"&gt;Enforcing Dependency Rules with NsDepCop&lt;a class="anchor" href="#enforcing-dependency-rules-with-nsdepcop" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Clean Architecture depends on dependencies pointing in the right direction: inward, toward the domain model. How that rule is enforced differs between the solutions in this repository.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Full template (&lt;code&gt;clean-arch&lt;/code&gt;)&lt;/strong&gt;: Layers are separate projects. Core has no project reference to Infrastructure, so code in Core &lt;em&gt;can&amp;rsquo;t&lt;/em&gt; use Infrastructure types. The compiler enforces the layering with no extra tooling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal template (&lt;code&gt;min-clean&lt;/code&gt;)&lt;/strong&gt;: Everything is in one Web project, so project references can&amp;rsquo;t keep &lt;code&gt;Domain&lt;/code&gt; away from &lt;code&gt;Infrastructure&lt;/code&gt;. &lt;a href="https://github.com/realvizu/NsDepCop"&gt;NsDepCop&lt;/a&gt; does that job instead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sample (&lt;code&gt;NimblePros.SampleToDo&lt;/code&gt;)&lt;/strong&gt;: Project references enforce the layers, the same as the full template. NsDepCop adds rules &lt;em&gt;inside&lt;/em&gt; the Core and UseCases projects, which project references can&amp;rsquo;t express.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-nsdepcop-works"&gt;How NsDepCop Works&lt;a class="anchor" href="#how-nsdepcop-works" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;NsDepCop is a Roslyn analyzer. It reads a &lt;code&gt;config.nsdepcop&lt;/code&gt; file in the project folder and reports error &lt;code&gt;NSDEPCOP01&lt;/code&gt; whenever code in one namespace references a type in a namespace the config forbids. Because it&amp;rsquo;s an analyzer, violations show up in the IDE as you type and fail &lt;code&gt;dotnet build&lt;/code&gt;, both locally and in CI.&lt;/p&gt;</description></item><item><title>Unit of Work &amp; Transactions</title><link>https://129ff325.cleanarchitecture.pages.dev/unit-of-work-and-transactions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/unit-of-work-and-transactions/</guid><description>&lt;h1 id="unit-of-work--transactions"&gt;Unit of Work &amp;amp; Transactions&lt;a class="anchor" href="#unit-of-work--transactions" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Sometimes a single use case has to change several aggregates, and those changes must succeed or fail together. The usual tools for this are the &lt;strong&gt;Unit of Work&lt;/strong&gt; pattern and database &lt;strong&gt;transactions&lt;/strong&gt;. This page explains what the template does by default and how to add your own unit of work when you need one.&lt;/p&gt;
&lt;h2 id="the-default-behavior"&gt;The Default Behavior&lt;a class="anchor" href="#the-default-behavior" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The sample repository, &lt;code&gt;EfRepository&amp;lt;T&amp;gt;&lt;/code&gt;, inherits from &lt;code&gt;RepositoryBase&amp;lt;T&amp;gt;&lt;/code&gt; in &lt;a href="https://github.com/ardalis/specification"&gt;Ardalis.Specification.EntityFrameworkCore&lt;/a&gt;. &lt;strong&gt;It does not support a unit of work or transactions that span calls.&lt;/strong&gt; Every write method saves right away:&lt;/p&gt;</description></item><item><title>Customizing</title><link>https://129ff325.cleanarchitecture.pages.dev/customizing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/customizing/</guid><description>&lt;h1 id="customizing-your-solution"&gt;Customizing Your Solution&lt;a class="anchor" href="#customizing-your-solution" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A generated solution is yours to change. This page covers the most common first changes.&lt;/p&gt;
&lt;h2 id="replace-the-example-code"&gt;Replace the example code&lt;a class="anchor" href="#replace-the-example-code" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The example code exists to show where things go. Once you understand it, remove it and add your own. In the full template, the &lt;code&gt;Contributor&lt;/code&gt; example touches:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Project&lt;/th&gt;
 &lt;th&gt;Example code&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Core&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;ContributorAggregate/&lt;/code&gt;, &lt;code&gt;Interfaces/IDeleteContributorService.cs&lt;/code&gt;, &lt;code&gt;Services/DeleteContributorService.cs&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;UseCases&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Contributors/&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Infrastructure&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Data/Config/ContributorConfiguration.cs&lt;/code&gt;, the &lt;code&gt;Contributors&lt;/code&gt; &lt;code&gt;DbSet&lt;/code&gt; in &lt;code&gt;AppDbContext&lt;/code&gt;, &lt;code&gt;Data/Queries/&lt;/code&gt;, &lt;code&gt;Data/SeedData.cs&lt;/code&gt;, &lt;code&gt;Data/Migrations/&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Web&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Contributors/&lt;/code&gt;, the sample requests in &lt;code&gt;api.http&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Tests&lt;/td&gt;
 &lt;td&gt;Tests named for contributors, plus the seed-data assertions in FunctionalTests&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In the minimal template, the example domain is products, carts, guest users, and orders under &lt;code&gt;Domain/&lt;/code&gt;, &lt;code&gt;CartFeatures/&lt;/code&gt;, &lt;code&gt;ProductFeatures/&lt;/code&gt;, and &lt;code&gt;Infrastructure/Data/&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Versions</title><link>https://129ff325.cleanarchitecture.pages.dev/versions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/versions/</guid><description>&lt;h1 id="versions"&gt;Versions&lt;a class="anchor" href="#versions" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;blockquote class='book-hint important'&gt;
&lt;p&gt;&lt;strong&gt;Version numbers on this site are template package versions, not .NET versions.&lt;/strong&gt; Since template v8, the template&amp;rsquo;s major version has been &lt;strong&gt;one higher&lt;/strong&gt; than the .NET version it targets. Template &lt;strong&gt;v11&lt;/strong&gt; targets &lt;strong&gt;.NET 10&lt;/strong&gt;, and template &lt;strong&gt;v12&lt;/strong&gt; targets &lt;strong&gt;.NET 11&lt;/strong&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="clean-architecture-template-ardaliscleanarchitecturetemplate"&gt;Clean Architecture template (&lt;code&gt;Ardalis.CleanArchitecture.Template&lt;/code&gt;)&lt;a class="anchor" href="#clean-architecture-template-ardaliscleanarchitecturetemplate" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Template version&lt;/th&gt;
 &lt;th&gt;Targets&lt;/th&gt;
 &lt;th&gt;First released&lt;/th&gt;
 &lt;th&gt;Notes&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;12.x&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;.NET 11&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;November 2026&lt;/td&gt;
 &lt;td&gt;Both templates now share one version number. See the &lt;a href="https://129ff325.cleanarchitecture.pages.dev/migration-guides/v11-to-v12/"&gt;v11 to v12 migration guide&lt;/a&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;11.x&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;.NET 10&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;November 2025&lt;/td&gt;
 &lt;td&gt;Mediator source generator replaces MediatR; Aspire 13. See the &lt;a href="https://129ff325.cleanarchitecture.pages.dev/migration-guides/v10-to-v11/"&gt;v10 to v11 migration guide&lt;/a&gt;. Latest: 11.1.1.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;10.x&lt;/td&gt;
 &lt;td&gt;.NET 9&lt;/td&gt;
 &lt;td&gt;November 2024&lt;/td&gt;
 &lt;td&gt;Latest: 10.1.1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;9.x&lt;/td&gt;
 &lt;td&gt;.NET 8&lt;/td&gt;
 &lt;td&gt;November 2023&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;8.x&lt;/td&gt;
 &lt;td&gt;.NET 7&lt;/td&gt;
 &lt;td&gt;August 2023&lt;/td&gt;
 &lt;td&gt;API endpoints use FastEndpoints only; Controllers, Razor Pages, and ApiEndpoints were removed.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;7.x&lt;/td&gt;
 &lt;td&gt;.NET 7&lt;/td&gt;
 &lt;td&gt;November 2022&lt;/td&gt;
 &lt;td&gt;7.1 is the last version with Controllers, Razor Pages, and ApiEndpoints.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;6.x&lt;/td&gt;
 &lt;td&gt;.NET 6&lt;/td&gt;
 &lt;td&gt;October 2021&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;5.x&lt;/td&gt;
 &lt;td&gt;.NET 5&lt;/td&gt;
 &lt;td&gt;April 2021&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Exact release dates and notes are on the &lt;a href="https://github.com/ardalis/CleanArchitecture/releases"&gt;GitHub Releases&lt;/a&gt; page and the &lt;a href="https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template#versions-body-tab"&gt;NuGet version history&lt;/a&gt;. Each release is tagged in Git (for example &lt;code&gt;v11.1.1&lt;/code&gt;), so you can browse the code for any version on GitHub.&lt;/p&gt;</description></item><item><title>Contributing</title><link>https://129ff325.cleanarchitecture.pages.dev/contributing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/contributing/</guid><description>&lt;h1 id="contributing"&gt;Contributing&lt;a class="anchor" href="#contributing" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We love your input! We want to make contributing to this project as easy and transparent as possible, whether it&amp;rsquo;s:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reporting a bug&lt;/li&gt;
&lt;li&gt;Discussing the current state of the code&lt;/li&gt;
&lt;li&gt;Submitting a fix&lt;/li&gt;
&lt;li&gt;Proposing new features&lt;/li&gt;
&lt;li&gt;Improving these docs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;If you&amp;rsquo;re unsure or afraid of &lt;em&gt;anything&lt;/em&gt;, just ask, or submit the issue or pull request anyway.&lt;/strong&gt; You won&amp;rsquo;t be yelled at for giving your best effort. The worst that can happen is that you&amp;rsquo;ll be politely asked to change something.&lt;/p&gt;</description></item><item><title>Resources</title><link>https://129ff325.cleanarchitecture.pages.dev/resources/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://129ff325.cleanarchitecture.pages.dev/resources/</guid><description>&lt;h1 id="resources"&gt;Resources&lt;a class="anchor" href="#resources" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="course"&gt;Course&lt;a class="anchor" href="#course" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://academy.nimblepros.com/p/learn-clean-architecture"&gt;Learn Clean Architecture&lt;/a&gt;&lt;/strong&gt; at NimblePros Academy, taught by &lt;a href="https://blog.nimblepros.com/authors/sadukie/"&gt;Sarah &amp;ldquo;sadukie&amp;rdquo; Dutkiewicz&lt;/a&gt; and &lt;a href="https://blog.nimblepros.com/authors/ardalis/"&gt;Steve &amp;ldquo;ardalis&amp;rdquo; Smith&lt;/a&gt;. It covers Clean Architecture and how to apply it with this template. Use code &lt;strong&gt;ARDALIS&lt;/strong&gt; to save 20%.&lt;/p&gt;
&lt;p&gt;Also from NimblePros Academy: &lt;strong&gt;&lt;a href="https://academy.nimblepros.com/p/documenting-decisions-a-practical-guide-to-architecture-decision-records"&gt;Documenting Decisions: A Practical Guide to Architecture Decision Records&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For team training or implementation help with Clean Architecture or DDD, contact &lt;a href="https://nimblepros.com/"&gt;NimblePros&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="book"&gt;Book&lt;a class="anchor" href="#book" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.amazon.com/dp/1805128531"&gt;Clean Architecture with .NET&lt;/a&gt;&lt;/strong&gt; by Casey Crouse, with Steve &amp;ldquo;ardalis&amp;rdquo; Smith as contributing author (Packt, 2026): &lt;em&gt;Design scalable .NET applications by using Clean Architecture principles and proven patterns.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>