Skip to main content

Helpdesk Query Patterns

Audience

Developers, database engineers, QA and support.

Summary

API handlers and backfill code compose EF Core queries directly; no repository/query-object layer exists.

Reference Content

  • Ticket list/detail uses no-tracking queries and includes assignment, comment and attachment children.
  • Employee history forwards the same tenant ticket list; no requester predicate exists.
  • Assignment/comment/attachment history is ordered or indexed by ticket and creation time.
  • Attachment download selects by ticket and attachment identity.
  • SLA checks filter unbreached/unmet due rows and join active assigned tickets.
  • Audit/timeline/outbox diagnostics order by occurrence and clamp result count.
  • Dashboard loads tenant ticket rows and separate SLA breach identities.
  • SLA reporting joins SLA, ticket and policy data; agent/category reports group in memory after loading rows.
  • Compatibility list loads joined rows before applying optional filters and result cap.

Requires confirmation

Pagination, requester filtering, server-side report grouping, query plans, memory bounds and diagnostic authorization require confirmation.

Source References

  • microservices/src/helpdesk-service/Api/HelpdeskEndpoints.cs
  • microservices/src/helpdesk-service/Infrastructure/HelpdeskDbContext.cs
  • microservices/src/helpdesk-service/Backfill/HelpdeskBackfill.cs

See Also

Keywords

EF Core query, ticket retrieval, report query, SLA query, history.

Revision Information

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