2024-01-21 00:26:21 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
2024-02-08 17:32:28 +08:00
|
|
|
|
using Volo.Abp.Data;
|
2024-01-21 00:26:21 +08:00
|
|
|
|
using Volo.Abp.Domain;
|
|
|
|
|
|
using Volo.Abp.Modularity;
|
|
|
|
|
|
using Volo.Abp.MultiTenancy;
|
|
|
|
|
|
using Volo.Abp.TenantManagement;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.TenantManagement.Domain
|
|
|
|
|
|
{
|
|
|
|
|
|
[DependsOn(typeof(AbpDddDomainModule),
|
|
|
|
|
|
typeof(AbpTenantManagementDomainSharedModule))]
|
|
|
|
|
|
public class YiFrameworkTenantManagementDomainModule : AbpModule
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
var services = context.Services;
|
2024-07-07 00:59:34 +08:00
|
|
|
|
services.Replace(new ServiceDescriptor(typeof(ITenantStore), typeof(SqlSugarAndConfigurationTenantStore), ServiceLifetime.Transient));
|
2024-02-08 17:32:28 +08:00
|
|
|
|
|
|
|
|
|
|
services.Replace(new ServiceDescriptor(typeof(IConnectionStringResolver), typeof(YiMultiTenantConnectionStringResolver), ServiceLifetime.Transient));
|
2024-01-21 00:26:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|