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
PolicySchemethat routes by header - Mediator is the command center — 7 pipeline behaviors registered in explicit order
Related
- Architecture: DI — DI conventions and patterns
- Startup Sequence — registration order in Program.cs