Skip to main content

Repositories

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

Domain repository interfaces abstract shift, weekly-off, policy, and assignment persistence. EF-backed adapters implement those interfaces using the shared Attendance database context.

Port surface

  • Shift reads by canonical or compatibility identity, name-existence checks, add, and query.
  • Weekly-off get-all, add, and query.
  • Policy get, default lookup, name-existence check, add, and query.
  • Assignment active lookup for an employee, add, and query.
  • Unit of work delegates save to the context.

Design tradeoffs

Returning queryables gives application queries flexibility and preserves provider-side filtering, but leaks persistence composition concerns across the boundary. Purpose-built commands remain repository-oriented. There is no separate read store or cache.

Tenant behavior

Repository adapters rely primarily on context-level global query filters. Application commands also require tenant context before writes. Super-administrator context bypasses query filters, which increases the importance of endpoint authorization and explicit mutation scoping.

Source References

  • microservices/src/attendance-service/Domain/Repositories.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