Skip to main content

Persistence Boundaries

Audience

Developers, QA engineers, support engineers, security engineers, solution architects, and implementation partners.

Reference Content

This page records source-verified technical behavior and boundaries for the workforce-scheduling capability.

Summary

One EF Core context owns attendance and shift-policy storage in the Attendance bounded-context schema. Scheduling records coexist with attendance, employee read models, snapshots, audit, timeline, and outbox records.

Mapping

Shifts use a canonical key plus a store-generated compatibility identity. Weekly-off rules are unique by tenant and weekday. A filtered unique index allows at most one default policy per tenant. Policy rules are owned through a collection and cascade with their policy. Assignments use lookup indexes for employee/start and shift, but intentionally have no navigation to Shift.

Isolation and evidence

Global query filters restrict tenant-owned entities unless the current context is super-administrator. Audit and timeline entities are append-oriented and tenant filtered. Domain events are translated to outbox records in the same save, but the translator only maps attendance lifecycle events; scheduling changes do not produce mapped events.

Transaction concern

Commands that perform multiple saves do not show an explicit transaction boundary. Database migrations are part of normal service startup unless suppressed, which couples service availability to schema readiness.

Source References

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

See Also

Keywords

  • Workforce scheduling
  • Shift policy
  • Attendance integration

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Next review: 2026-10-20