mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2024-09-20 23:48:27 +08:00
田雨
修改引用对象 SqlSugarScope
This commit is contained in:
parent
06b7f8abe8
commit
8eb59ee3da
|
@ -93,7 +93,7 @@ namespace Blog.Core.Extensions
|
|||
}
|
||||
);
|
||||
});
|
||||
return new SqlSugarClient(listConfig);
|
||||
return new SqlSugarScope(listConfig);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Blog.Core.Repository.Base
|
|||
public class BaseRepository<TEntity> : IBaseRepository<TEntity> where TEntity : class, new()
|
||||
{
|
||||
private readonly IUnitOfWork _unitOfWork;
|
||||
private SqlSugarClient _dbBase;
|
||||
private SqlSugarScope _dbBase;
|
||||
|
||||
private ISqlSugarClient _db
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Blog.Core.IRepository.UnitOfWork
|
|||
{
|
||||
public interface IUnitOfWork
|
||||
{
|
||||
SqlSugarClient GetDbClient();
|
||||
SqlSugarScope GetDbClient();
|
||||
|
||||
void BeginTran();
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ namespace Blog.Core.Repository.UnitOfWork
|
|||
/// 获取DB,保证唯一性
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SqlSugarClient GetDbClient()
|
||||
public SqlSugarScope GetDbClient()
|
||||
{
|
||||
// 必须要as,后边会用到切换数据库操作
|
||||
return _sqlSugarClient as SqlSugarClient;
|
||||
return _sqlSugarClient as SqlSugarScope;
|
||||
}
|
||||
|
||||
public void BeginTran()
|
||||
|
|
Loading…
Reference in New Issue
Block a user