You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
925 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Data;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace NPin.Framework.TenantManagement.Domain;
[DependsOn(
typeof(AbpDddDomainModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class NPinFrameworkTenantManagementDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var services = context.Services;
// 替换原有服务
services.Replace(new ServiceDescriptor(typeof(ITenantStore), typeof(SqlSugarTenantStore), ServiceLifetime.Transient));
services.Replace(new ServiceDescriptor(typeof(IConnectionStringResolver),
typeof(NPinMultiTenantConnectionStringResolver), ServiceLifetime.Transient));
}
}