Skip to content

Conjoined tenancy: Marten-mirroring admin convenience API (AddWolverineManagedTenantsAsync / RemoveWolverineManagedTenantsAsync) #3537

Description

@jeremydmiller

Residual from the conjoined EF Core multi-tenancy epic (#3465), Phase 3 (#3464). The #3464 design proposed:

Admin convenience API mirroring Marten's: host.AddWolverineManagedTenantsAsync(params string[] tenantIds) / (Dictionary<string,string> tenantToSuffix) / RemoveWolverineManagedTenantsAsync(...), returning Weasel TablePartitionStatus[].

This did not ship in #3498git grep AddWolverineManagedTenants comes back empty at 6.22.0-alpha.1. The current public path is resolving IDynamicTenantSource<string> from DI and calling AddTenantAsync / RemoveTenantAsync one tenant at a time (that's what the ConjoinedMultiTenantedEfCore sample's TenantEndpoints does), with no batch shape and no per-table partition status reporting back to the caller.

Acceptance criteria

  • IHost extension(s) mirroring Marten's AddMartenManagedTenantsAsync family: batch add by ids, add with explicit partition-suffix assignment, batch remove.
  • Returns per-table status (Weasel TablePartitionStatus[] / TenantPartitionAddResult) so callers and CritterWatch can report partial failures — overlaps with the batch-status bullet of EF Core integration: adopt Weasel 9.18.0 ManagedTenantPartitions parity APIs (SQL Server) #3496; coordinate the shapes.
  • Docs section on the EF Core multi-tenancy page + sample usage.

Related: #3465, #3464, #3496.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions