You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IServiceCollection based configuration for tenants
builder.Host.UseStashboxMultitenant<HttpHeaderTenantIdExtractor>(
options =>{// Root container configuration through the IStashboxContainer interface.options.RootContainer.Configure(opts =>{/* configure the root container */});// Configure root services through the IServiceCollection interface.options.ConfigureRootServices(services =>services.AddTransient<IDependency,DefaultDependency>());// Configure tenants.options.ConfigureTenant("TenantA", tenantContainer =>tenantContainer.Configure(opts =>{/* configure the tenant container */}))// Register tenant specific service overrides through the IServiceCollection interface..ConfigureServices(services =>services.AddTransient<IDependency,TenantASpecificDependency>());options.ConfigureTenant("TenantB", tenantContainer =>tenantContainer.Configure(opts =>{/* configure the tenant container */}))// Register tenant specific service overrides through the IServiceCollection interface..ConfigureServices(services =>services.AddTransient<IDependency,TenantBSpecificDependency>());});