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

but my connection string comes from api in multi tenant app and multiple database #4902

Open
NarenderDhamarlapally opened this issue Dec 7, 2024 · 1 comment

Comments

@NarenderDhamarlapally
Copy link

Type of issue

Typo

Description

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
var tenant = _tenantService.Tenant;
var connectionStr = _configuration.GetConnectionString(tenant);
optionsBuilder.UseSqlite(connectionStr);
}

this is microsoft documentation

but my connection string comes from api

Page URL

https://learn.microsoft.com/en-us/ef/core/miscellaneous/multitenancy

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/miscellaneous/multitenancy.md

Document Version Independent Id

bb29a2b6-c401-287f-2da9-1aeb3c633b41

Article author

@JeremyLikness

@roji
Copy link
Member

roji commented Dec 7, 2024

@NarenderDhamarlapally this is just a code sample showing one scenario; it's up to you to adjust the code to get the connection string for your tenant in whatever way is needed in your own application.

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

No branches or pull requests

2 participants