Skip to content

Reference

What TenantGuard does, exactly. These pages list every rule, diagnostic, option, exception and log event, with the messages word for word. They are the contract: a change to a rule ID, a message, an option name or an exception type is a breaking change (Compatibility).

  • Model rules: TGM001 to TGM010, checked when EF Core builds the model
  • Analyzers: TG001 to TG004, checked at compile time
  • Write guard: what SaveChanges checks for each Added, Modified and Deleted entry
  • Isolation probe: how the probe seeds rows and what each check proves
  • Test adapters: each probe row as a test of its own, in xUnit v3 and TUnit
  • Validate tool: dotnet tenantguard validate, the model rules in CI without a database
  • Options: UseTenantGuard, startup validation, TenantGuardModel.Validate and the bypass scope
  • Exceptions: what TenantGuard throws, and when
  • Logging: the TenantGuard log category and its events
  • Compatibility: what stays the same between releases

For how to put them to work, see the guides; for how it’s built, the architecture.