-
Book Overview & Buying
-
Table Of Contents
Clean Architecture with .NET
By :
So far, our application has relied on a single extension method—AddCoreLayerServices—to register all foundational services. While this keeps infrastructure wiring centralized, it still leaves control in the hands of the Presentation layer. The host decides when to call that method, where to place it relative to other registrations, and whether to call it consistently across different application types.
In this section, we will refactor that structure so that our infrastructure defines its own ordered registration pipeline. The Presentation layer will no longer call into infrastructure directly; instead, it will execute a composition root that delegates foundational registrations to a strongly typed pipeline.
Nothing about the services themselves will change. What changes is who controls their composition and how that composition is expressed.
We'll begin in the Infrastructure layer.