Attendance Infrastructure Layer
Summary
Infrastructure supplies EF Core/PostgreSQL persistence, tenant-aware adapters, integration clients, and background outbox delivery.
Audience
Backend and DevOps engineers, architects, support engineers, and QA engineers.
Components
AttendanceDbContext maps aggregates and supporting models, applies tenant query filters, enforces selected uniqueness constraints, and converts queued domain events into outbox records during SaveChanges. Repository implementations provide tracked aggregate retrieval and queryable projections. UnitOfWork delegates to the context. AuditWriter and TimelineWriter append technical change records in the same commit.
The outbox store reads pending or failed messages; a hosted relay invokes the shared processor and broker adapter without blocking the originating request. The Payroll lock HTTP adapter forwards authenticated tenant/correlation context and translates dependency responses into a lock decision. Development seeding and the standalone backfill path support foundation initialization and transitional migration; they are not runtime business dependencies.
No dedicated search engine, cache, distributed transaction coordinator, or separate persistence assembly exists. External dependencies are PostgreSQL, the broker, and the current Payroll lock authority.
Source References
microservices/src/attendance-service/Infrastructure/AttendanceDbContext.csmicroservices/src/attendance-service/Infrastructure/Persistence.csmicroservices/src/attendance-service/Infrastructure/PayrollLockClient.csmicroservices/src/attendance-service/Infrastructure/OutboxRelayHostedService.csmicroservices/src/attendance-service/Infrastructure/DevelopmentSeeder.csmicroservices/src/attendance-service/Backfill/ShiftPolicyBackfillCli.cs
Related Articles
See Also
Keywords
- Attendance Service
- Attendance Infrastructure Layer
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly