Blame view

Yi.Abp.Net8/module/antis-erp/Antis.Erp.SqlSugarCore/AntisErpSqlSugarCoreModule.cs 1.12 KB
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
25
26
27
28
29
30
31
32
  using Antis.Erp.Domain;
  using Antis.Erp.SqlSugarCore;
  using Yi.Framework.AuditLogging.SqlSugarCore;
  using Yi.Framework.Mapster;
  using Yi.Framework.Rbac.SqlSugarCore;
  using Yi.Framework.SettingManagement.SqlSugarCore;
  using Yi.Framework.SqlSugarCore;
  using Yi.Framework.TenantManagement.SqlSugarCore;
  
  namespace Antis.Erp.SqlsugarCore
  {
      [DependsOn(
          typeof(AntisErpDomainModule),
  
          typeof(YiFrameworkRbacSqlSugarCoreModule),
  
          typeof(YiFrameworkSettingManagementSqlSugarCoreModule),
          typeof(YiFrameworkAuditLoggingSqlSugarCoreModule),
          typeof(YiFrameworkTenantManagementSqlSugarCoreModule),
          typeof(YiFrameworkMapsterModule),
          typeof(YiFrameworkSqlSugarCoreModule)
      )]
      public class AntisErpSqlSugarCoreModule : AbpModule
      {
          public override void ConfigureServices(ServiceConfigurationContext context)
          {
              context.Services.AddYiDbContext<YiDbContext>();
              //默认不开放,可根据项目需要是否Db直接对外开放
              //context.Services.AddTransient(x => x.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient);
          }
      }
  }