Skip to content

How to change the connection string based on the requested tenant? #6962

Answered by deanmarcussen
MikeAlhayek asked this question in Q&A
Discussion options

You must be logged in to vote

This is all very well documented https://docs.orchardcore.net/en/dev/docs/reference/core/Configuration/

You need to use IShellConfiguration if you want tenant level settings.

.GetConnectionString has no meaning in this context, you should load values from IShellConfiguration appsettings keys.

You can also inject ShellSettings to get settings for a specific tenant.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ApacheTech
Comment options

@MikeAlhayek
Comment options

MikeAlhayek Apr 18, 2024
Collaborator Author

Answer selected by MikeAlhayek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants