0
alliance225 created
Hello, I am using asp.net core mvc. I have multitenancy enabled but for now I have only one tenant with many users. on login page I want to set by default tenant to the current tenant which is not default.
How do i achieve that?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Hi,
For a better design, you can create a custom TenantResolveContributor, see https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant
- This custom TenantResolveContributor can set the tenant to existing one always.
- You need to insert your custom class to first item into
Configuration.MultiTenancy.Resolverslist.
If you have more tenants in the future you can delete this class or it can automatically skip to set tenant if there are more than 1 tenant in the DB.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)