Skip to content

Fix/multitenancy middleware scope#44

Merged
mheidari988 merged 2 commits intomainfrom
fix/multitenancy-middleware-scope
Jan 12, 2026
Merged

Fix/multitenancy middleware scope#44
mheidari988 merged 2 commits intomainfrom
fix/multitenancy-middleware-scope

Conversation

@mheidari988
Copy link
Contributor

Summary

  • Resolve multitenancy middleware scoped services per request to avoid root-provider resolution failures (e.g., during NSwag startup), and update/add tests to cover the new behavior.

Testing

  • dotnet test
  • Other (add details):

Checklist

  • Includes docs/changelog updates if user-facing
  • Adds/updates tests
  • Keeps public API surface minimal and backward compatible (or documents breaking change)
  • PR scoped to a single concern/module where possible

Notes

  • Breaking changes? The public TenantResolutionMiddleware constructor signature changed (now only RequestDelegate), which breaks direct instantiation; standard usage via UseCleanArchitectureMultitenancy() is unaffected.
  • Related issues/links:

Aligns TenantResolutionMiddleware tests with the new InvokeAsync signature and adds a pipeline build check with scope validation.
@mheidari988 mheidari988 self-assigned this Jan 12, 2026
@mheidari988 mheidari988 merged commit 5b8a35f into main Jan 12, 2026
2 checks passed
@mheidari988 mheidari988 deleted the fix/multitenancy-middleware-scope branch January 12, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant