0
balessi75 created
ABP Commercial 7.0.1 / Blazor Server / EF / Non tiered / Seperated Host and Tenant DBs
Hi, as per the answer to... https://support.abp.io/QA/Questions/4703/Question-on-separate-databases-per-tenant
...we are attempting to override MultiTenantConnectionStringResolver
The problem is that the ResolveAsync
method never gets hit in our overriden/replaced implementation when we set a brake point. Either we are not overriding/replacing the correct Abp class or there is a problem with the way we are attempting to override the resolver.
Our override/replace is defined as follows:
using Volo.Abp.MultiTenancy;
namespace FM.nVision.Saas;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(MultiTenantConnectionStringResolver))]
public class MyMultiTenantConnectionStringResolver : MultiTenantConnectionStringResolver
{
private readonly ICurrentTenant _currentTenant;
public MyMultiTenantConnectionStringResolver(
IOptionsMonitor<AbpDbConnectionOptions> options,
ICurrentTenant currentTenant,
IServiceProvider serviceProvider)
: base(options, currentTenant, serviceProvider)
{
_currentTenant = currentTenant;
}
public override async Task<string> ResolveAsync(string connectionStringName = null)
{
return await base.ResolveAsync(connectionStringName);
}
}
We are attempting to decrypt the connection string from the database when the framework is reading it.
Please advise and thanks in advance...