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