Skip to main content

Leave Dependency Injection

Summary

The composition root registers request-scoped domain orchestration and persistence plus singleton-managed hosted services and shared infrastructure.

Audience

Backend developers, architects, QA, and new engineers.

Overview

The composition root registers the DbContext, tenant context, repository ports, unit of work, audit writer, command/query services, outbox store, typed external clients, options, authentication/authorization services, health, discovery, Shared Kernel messaging, and observability. Employee projection and outbox relay are hosted services.

Repositories, unit of work, audit, tenant context, and application services are scoped. Typed HTTP clients use the framework client factory. Workflow client registration changes with optional delegation. The calculator is static and therefore has no DI registration. Shared Kernel supplies messaging processors/event bus. No MediatR registration exists.

Source References

  • microservices/src/leave-service/Program.cs
  • microservices/src/leave-service/Application/LeaveWorkflows.cs

See Also

Keywords

  • Leave Service
  • Leave Dependency Injection
  • Technical architecture

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly