-
Is it possible to create and access tenant scope services by calling eg. In following code I need to access host services + var host = CreateHostBuilder(args).Build();
using var services = host.Services.CreateScope(); |
Beta Was this translation helpful? Give feedback.
Answered by
ns8482e
Sep 10, 2021
Replies: 1 comment
-
Finally figured out how to create scope by using tenant name var host = CreateHostBuilder(args).Build();
using var appServices = host.Services.CreateScope();
var tenanthost = appServices.ServiceProvider.GetService<IShellHost>();
await tenanthost.InitializeAsync();
var list = tenanthost.ListShellContexts();
// Get Tenant services.
var services = await tenanthost.GetScopeAsync("Default"); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ns8482e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally figured out how to create scope by using tenant name