Skip to main content

Helpdesk DbContexts

Audience​

Developers, database engineers, QA, support and architects.

Summary​

Exactly one runtime DbContext is verified. A design-time factory constructs the same context type; it is not a second runtime context.

Reference Content​

ContextPurposeProviderRelevant setsTenant filteringSave behaviorAuditSource
HelpdeskDbContextCanonical Helpdesk state, activity and integration persistencePostgreSQL EF Core provider13 sets documented in schema referenceGlobal filters on tenant entities, audit and timeline; super-admin bypassStandard inherited SaveChanges; handlers call it explicitlyAudit/timeline rows added through persistence helpersmicroservices/src/helpdesk-service/Infrastructure/HelpdeskDbContext.cs

Program registers the context as scoped. The design-time factory supplies NullTenantContext, whose super-administrator state permits model/design operations without runtime tenant filtering.

Requires confirmation​

Context lifetime in production, retry/transaction configuration, design-time security and provider upgrade policy require confirmation.

Source References​

  • microservices/src/helpdesk-service/Infrastructure/HelpdeskDbContext.cs
  • microservices/src/helpdesk-service/Program.cs
  • microservices/src/helpdesk-service/Infrastructure/Persistence.cs

See Also​

Keywords​

HelpdeskDbContext, EF Core provider, DbSet, design-time factory.

Revision Information​

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