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
Is your improvement related to a problem? Please describe.
It doesn't seem possible to resolve a dependency from the ServiceProvider for use when calling UseNServiceBus.
The specific instance where this could be helpful is when using SqlPersistance with MutlipleTenants.
Example:
Host.CreateDefaultBuilder(args).ConfigureServices(services =>{services.AddSingleton<ConnectionStringBuilder>();}).UseNServiceBus(c =>{varendpointConfiguration=newEndpointConfiguration(endpointName);varpersistence=endpointConfiguration.UsePersistence<SqlPersistence>();persistence.SqlDialect<SqlDialect.MsSqlServer>();persistence.MultiTenantConnectionBuilder(tenantIdHeaderName:"TenantId",buildConnectionFromTenantData:
tenantId =>{returnnew//Can't figure out how to resolve ConnectionStringBuilder SqlConnection(ConnectionStringBuilder.GetConnectionStringForTenant(tenantId));});}
Describe the suggested solution
Provide some way to resolve the dependencies inside UseNServiceBus
Describe alternatives you've considered
A static method is being used to provide the functionality to get the tenant-specific connection string.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the suggested improvement
Is your improvement related to a problem? Please describe.
It doesn't seem possible to resolve a dependency from the ServiceProvider for use when calling UseNServiceBus.
The specific instance where this could be helpful is when using SqlPersistance with MutlipleTenants.
Example:
Describe the suggested solution
Provide some way to resolve the dependencies inside UseNServiceBus
Describe alternatives you've considered
A static method is being used to provide the functionality to get the tenant-specific connection string.
Additional Context
No response
The text was updated successfully, but these errors were encountered: