GH-3465: worked-example documentation for conjoined EF Core multi-tenancy - #3532
Merged
Merged
Conversation
…m the sample app
The conjoined EF Core multi-tenancy docs described the application-code payoff
("your handlers never touch TenantId") in prose but only ever showed synthetic
registration snippets from the test project. This adds a "A Worked Example"
section to the EF Core multi-tenancy page that shows the real end-to-end code —
an ITenanted entity, a vanilla DbContext, HTTP tenant detection, a
stamp-on-insert write endpoint, tenant-scoped read endpoint + message handler,
and the CrossTenantWriteException write-side guard — all pulled as live,
compile-verified snippets from the merged ConjoinedMultiTenantedEfCore sample
app (which is in wolverine.slnx), plus a prominent link to the runnable sample.
Follow-up #3531 filed for mixed-engine partitioning coverage (EF Core conjoined
partitioning alongside Marten, and alongside Polecat, in one database).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation follow-up for the conjoined EF Core multi-tenancy epic (#3465). The feature (Phases 1–3), the
ConjoinedMultiTenantedEfCoresample app (#3515), and the reference docs already shipped for 6.21 — but the docs described the application-code payoff ("your handlers never touchTenantId") only in prose, and every code snippet came from the syntheticMultiTenancyDocumentationSamples.cstest file.What this adds
A new "A Worked Example" section on
docs/guide/durability/efcore/multi-tenancy.mdthat shows the real end-to-end code:ITenantedentity (plus a deliberately non-tenantedProduct)DbContextTenantIdCrossTenantWriteExceptionwrite-side guardEvery snippet is pulled via mdsnippets from the merged
ConjoinedMultiTenantedEfCoresample app, which is part ofwolverine.slnx, so the samples are live and compile-verified rather than hand-typed. The section also links prominently to the runnable sample and its guidedcurltour.Done in a single PR to avoid the CI tax. Only the target docs page and the sample-app source (region markers) change; the other 50+ pages mdsnippets regenerated from the checkout were reverted.
Follow-up filed
#3531 — test conjoined EF Core tenant partitioning alongside a mix of Marten conjoined tenancy, and alongside Polecat, in one shared database (out of scope here; needs a multi-store rig, and the Polecat leg may gate on JasperFx/polecat#335).
🤖 Generated with Claude Code