Leave Infrastructure Layer
Summary
Infrastructure implements persistence, tenant context, audit/outbox storage, external clients, projection consumption, and local development initialization.
Audience
Backend developers, architects, QA, DevOps, and support engineers.
Overview
EF Core with PostgreSQL provides persistence. Repository implementations expose tracked query roots and aggregate lookup/mutation. Global tenant filters apply to tenant-owned sets. Unit of work delegates to DbContext save, which translates domain events into outbox messages.
Typed HTTP adapters implement Attendance conflict and optional Workflow ports while forwarding safe request context. EmployeeProfileConsumer maintains the Leave-local employee projection. The outbox store and hosted relay publish integration events through Shared Kernel messaging.
Development seeding exists but is not a production source of business configuration. Migration execution is a startup concern. Exact configuration and infrastructure values are intentionally excluded.
Source References
microservices/src/leave-service/Infrastructure/LeaveDbContext.csmicroservices/src/leave-service/Infrastructure/Persistence.csmicroservices/src/leave-service/Infrastructure/AttendanceServiceConflictClient.csmicroservices/src/leave-service/Infrastructure/WorkflowServiceClient.csmicroservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
Related Articles
See Also
Keywords
- Leave Service
- Leave Infrastructure Layer
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly