Skip to content
bitzorcas
EN

Concept

Dependency Injection Tree

DI registration hierarchy across the four composition root groups.

Last updated

Overview

The DI tree diagram maps how services are organized across the four composition root registration groups: Core Runtime, Persistence Adapters, Authentication, and API Pipeline. Each branch shows the key services registered and their lifetimes.

Key takeaways

  • Core Runtime registers per-request context (CurrentUser, TenantContext) as Scoped
  • Persistence Adapters are switchable — SqlSugar or EF Core, both sharing Persistence.Models
  • Authentication registers three handlers behind a PolicyScheme that routes by header
  • Mediator is the command center — 7 pipeline behaviors registered in explicit order