Blame view

Yi.Abp.Net8/module/tenant-management/Yi.Framework.TenantManagement.Domain/YiFrameworkTenantManagementDomainModule.cs 935 Bytes
515fceeb   “wangming”   框架初始化
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  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 Yi.Framework.TenantManagement.Domain
  {
      [DependsOn(typeof(AbpDddDomainModule),
          typeof(AbpTenantManagementDomainSharedModule))]
      public class YiFrameworkTenantManagementDomainModule : AbpModule
      {
  
          public override void ConfigureServices(ServiceConfigurationContext context)
          {
              var services = context.Services;
              services.Replace(new ServiceDescriptor(typeof(ITenantStore), typeof(SqlSugarAndConfigurationTenantStore), ServiceLifetime.Transient));
  
              services.Replace(new ServiceDescriptor(typeof(IConnectionStringResolver), typeof(YiMultiTenantConnectionStringResolver), ServiceLifetime.Transient));
          }
      }
  }