-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
[Question] MultiTenantContext now readonly #816
Comments
Hi yes. It’s an implementation detail but you can inject |
Impressive! |
I just ran into this same issue. I see IMultiTenantContextSetter is documented as an "implementation detail". Is there any plan to expose this functionality for general use? We are using the library in scenarios where the "entry point" is not an HTTP request. |
Yes it is available to inject as an interface currently. For your use case it is the right approach (or you could mutate the tenant info on the context but I don’t recommend that). |
@AndrewTriesToCode Sorta related to this, when having a design time factory, how are we now supposed to inject the |
Hi Andrew, Prior to the upgrade, I handled non http requests with something like this
using the new interface, I will handle non http request as below?
|
Hi @fbjerggaard and @goforebroke Check out the Identity sample where I have the db design time factory in the data folder and and per-tenant scope for migration in program.cs. I kept the old constructor signature for the mult-tenant db contexts specifically for these use cases despite the change in dependency injection. I should maybe update the docs on this topic. |
The change in v7.0.0 makes MultiTenantContext to be readonly preventing changing of currect tenant info.
More details fullstackhero/dotnet-starter-kit#925
Is there another way this can be done?
The text was updated successfully, but these errors were encountered: