Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenancy context #30

Merged
merged 4 commits into from
Mar 3, 2024
Merged

Tenancy context #30

merged 4 commits into from
Mar 3, 2024

Conversation

woksin
Copy link
Member

@woksin woksin commented Mar 3, 2024

Summary

Added more features that makes it easier to use this package together with third party libraries and frameworks like Wolverine, Akka, etc.

Added

  • Add resolved tenant context to the HttpContext.Item dictionary and a way to easily retrieve it from the HttpContext without relying on the AsyncLocal TenantContextAccessor
  • StaticTenantContextAccessor that resolves either the statically configured tenant or the 'unresolved' tenant context. This type will be used instead of the AsyncLocal TenantContextAccessor if DisableAsyncLocalTenantContext method on TenancyBuilder. This can be useful if you're only interested in using the tenant context by passing it around in messages or using the one that's added to the HttpContext. For instance using frameworks and libraries that relies on running different processes on different threads or resuming contexts (Actor frameworks, Wolverine, etc.) then it can be useful to not rely on the AsyncLocal TenantContextAccessor

@woksin woksin added the minor label Mar 3, 2024
@woksin woksin merged commit b619a59 into main Mar 3, 2024
1 check passed
@woksin woksin deleted the tenancy-context branch March 3, 2024 20:37
@woksin woksin mentioned this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant