2024-01-09 16:59:20 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using Volo.Abp.Modularity;
|
2023-12-11 09:55:12 +08:00
|
|
|
|
using Yi.Abp.Domain;
|
|
|
|
|
|
using Yi.Abp.SqlSugarCore;
|
2024-02-16 21:06:34 +08:00
|
|
|
|
using Yi.Framework.AuditLogging.SqlSugarCore;
|
2023-12-11 09:55:12 +08:00
|
|
|
|
using Yi.Framework.Bbs.SqlSugarCore;
|
|
|
|
|
|
using Yi.Framework.Mapster;
|
|
|
|
|
|
using Yi.Framework.Rbac.SqlSugarCore;
|
|
|
|
|
|
using Yi.Framework.SqlSugarCore;
|
2024-01-09 16:59:20 +08:00
|
|
|
|
using Yi.Framework.SqlSugarCore.Abstractions;
|
2024-01-21 00:26:21 +08:00
|
|
|
|
using Yi.Framework.TenantManagement.SqlSugarCore;
|
2023-12-11 09:55:12 +08:00
|
|
|
|
|
|
|
|
|
|
namespace Yi.Abp.SqlsugarCore
|
|
|
|
|
|
{
|
|
|
|
|
|
[DependsOn(
|
|
|
|
|
|
typeof(YiAbpDomainModule),
|
|
|
|
|
|
|
|
|
|
|
|
typeof(YiFrameworkRbacSqlSugarCoreModule),
|
|
|
|
|
|
typeof(YiFrameworkBbsSqlSugarCoreModule),
|
|
|
|
|
|
|
2024-01-23 15:08:01 +08:00
|
|
|
|
typeof(YiFrameworkAuditLoggingSqlSugarCoreModule),
|
2024-01-21 00:26:21 +08:00
|
|
|
|
typeof(YiFrameworkTenantManagementSqlSugarCoreModule),
|
2023-12-11 09:55:12 +08:00
|
|
|
|
typeof(YiFrameworkMapsterModule),
|
|
|
|
|
|
typeof(YiFrameworkSqlSugarCoreModule)
|
|
|
|
|
|
)]
|
|
|
|
|
|
public class YiAbpSqlSugarCoreModule : AbpModule
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
context.Services.AddYiDbContext<YiDbContext>();
|
2024-01-09 16:59:20 +08:00
|
|
|
|
//默认不开放,可根据项目需要是否Db直接对外开放
|
|
|
|
|
|
//context.Services.AddTransient(x => x.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient);
|
2023-12-11 09:55:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|