Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to use DbContextFactory with multi-tenancy in Blazor Server?

$
0
0

I have a multi-tenant Blazor Server App. Multitenancy is handled by Finbuckle.Multitenant.

I set up my tenant info based on the following article.

Currently, in my Startup.cs I have the following:

services.AddDbContextFactory<AppContext>(options =>{    options.UseSqlServer(configuration.GetConnectionString("App"));});

However, I need to change this so that the DbContextFactory is registered with the DI after the app starts and the tenant is known.

Is this possible? How can I do this?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>