Skip to content

Commit 8eb59ee

Browse files
committed
田雨
修改引用对象 SqlSugarScope
1 parent 06b7f8a commit 8eb59ee

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Blog.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void AddSqlsugarSetup(this IServiceCollection services)
9393
}
9494
);
9595
});
96-
return new SqlSugarClient(listConfig);
96+
return new SqlSugarScope(listConfig);
9797
});
9898
}
9999

Blog.Core.Repository/BASE/BaseRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Blog.Core.Repository.Base
1616
public class BaseRepository<TEntity> : IBaseRepository<TEntity> where TEntity : class, new()
1717
{
1818
private readonly IUnitOfWork _unitOfWork;
19-
private SqlSugarClient _dbBase;
19+
private SqlSugarScope _dbBase;
2020

2121
private ISqlSugarClient _db
2222
{

Blog.Core.Repository/UnitOfWork/IUnitOfWork.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Blog.Core.IRepository.UnitOfWork
44
{
55
public interface IUnitOfWork
66
{
7-
SqlSugarClient GetDbClient();
7+
SqlSugarScope GetDbClient();
88

99
void BeginTran();
1010

Blog.Core.Repository/UnitOfWork/UnitOfWork.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public UnitOfWork(ISqlSugarClient sqlSugarClient, ILogger<UnitOfWork> logger)
2020
/// 获取DB,保证唯一性
2121
/// </summary>
2222
/// <returns></returns>
23-
public SqlSugarClient GetDbClient()
23+
public SqlSugarScope GetDbClient()
2424
{
2525
// 必须要as,后边会用到切换数据库操作
26-
return _sqlSugarClient as SqlSugarClient;
26+
return _sqlSugarClient as SqlSugarScope;
2727
}
2828

2929
public void BeginTran()

0 commit comments

Comments
 (0)