Files
Yi.Admin/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiAbpSqlSugarCoreModule.cs

31 lines
1013 B
C#
Raw Normal View History

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;
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;
2023-12-11 09:55:12 +08:00
namespace Yi.Abp.SqlsugarCore
{
[DependsOn(
typeof(YiAbpDomainModule),
typeof(YiFrameworkRbacSqlSugarCoreModule),
typeof(YiFrameworkBbsSqlSugarCoreModule),
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
}
}
}