mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-04 00:35:47 +08:00
31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
|
|
using Microsoft.Extensions.DependencyInjection;
|
|||
|
|
using Volo.Abp.Modularity;
|
|||
|
|
using Acme.BookStore.Domain;
|
|||
|
|
using Acme.BookStore.SqlSugarCore;
|
|||
|
|
using Yi.Framework.Bbs.SqlSugarCore;
|
|||
|
|
using Yi.Framework.Mapster;
|
|||
|
|
using Yi.Framework.Rbac.SqlSugarCore;
|
|||
|
|
using Yi.Framework.SqlSugarCore;
|
|||
|
|
using Yi.Framework.SqlSugarCore.Abstractions;
|
|||
|
|
|
|||
|
|
namespace Acme.BookStore.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>();
|
|||
|
|
//默认不开放,可根据项目需要是否Db直接对外开放
|
|||
|
|
//context.Services.AddTransient(x => x.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|