Skip to main content

Attendance Database Overview

Summary

Attendance Service uses the Npgsql PostgreSQL provider and EF Core code-first persistence. AttendanceDbContext owns the bounded-context model and coordinates aggregate state, read models, history, and outbox records.

Audience

  • Backend developers, QA engineers, DevOps engineers, solution architects, and support engineers

Overview

Persistence architecture

Confirmed responsibilities

ConcernCurrent behavior
ProviderNpgsql EF Core provider for PostgreSQL
MappingFluent mappings and default Attendance-owned schema in AttendanceDbContext
RepositoriesAggregate-specific EF adapters; query surfaces expose composable IQueryable
Unit of workDelegates commits to SaveChangesAsync
Tenant filteringGlobal filters on 12 tenant business/history objects
HistorySeparate append-oriented audit and timeline objects
MessagingDomain events are translated into outbox rows before the same save
EvolutionThree code-first migrations and a current model snapshot
Read modelsAttendance-local employee profile and payroll-approved snapshot
CompatibilitySpecialized backfill context and read-only monolith source tooling

The service does not use shared Attendance tables from another service. Compatibility does not change data ownership.

Source References

  • microservices/src/attendance-service/attendance-service.csproj
  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/attendance-service/Infrastructure/Persistence.cs
  • microservices/src/attendance-service/Program.cs

See Also

Keywords

  • Attendance persistence
  • EF Core
  • PostgreSQL

Revision Information

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