We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Jos Krause • 3 years ago

This approach will effectively "cache" the tenantId used in OnModelCreating, thus switching the tenant will not work, as OnModelCreating is only called once per application context.

Pri • 3 years ago

Hi Gunnar,
Thank you for sharing the sample code. Could you please expand upon how can we now modify the GetTenant method to dynamically select the tenant depending upon the domain name? Is using IHttpContextAccessor in DummyTenantProvider correct way of doing it?

Vinicius • 6 years ago

Hi Gunnar,
In your sample, you considered to use the first tenant on DummyTenantProvider, but if is necessary to use an identifier came from URI and pass to GetTenant method of service return one tanant acording of this identifier? how could do this? This will be an more pratical usage. Thanks