feat: 完成ISqlSugarDbContextDependencies抽离
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Yi.Abp.SqlsugarCore
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddYiDbContext<YiDbContext>();
|
||||
context.Services.AddYiDbContext<YiDbContextFactory>();
|
||||
//默认不开放,可根据项目需要是否Db直接对外开放
|
||||
//context.Services.AddTransient(x => x.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ using Yi.Framework.SqlSugarCore;
|
||||
|
||||
namespace Yi.Abp.SqlSugarCore
|
||||
{
|
||||
public class YiDbContext : YiRbacDbContext
|
||||
public class YiDbContextFactory : YiRbacDbContextFactory
|
||||
{
|
||||
public YiDbContext(IAbpLazyServiceProvider lazyServiceProvider) : base(lazyServiceProvider)
|
||||
public YiDbContextFactory(IAbpLazyServiceProvider lazyServiceProvider) : base(lazyServiceProvider)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user