Merge branch 'abp-dev' of https://gitee.com/ccnetcore/Yi into abp-dev
This commit is contained in:
@@ -102,7 +102,7 @@ namespace Yi.Framework.SqlSugarCore
|
||||
}
|
||||
if (IsMultiTenantFilterEnabled)
|
||||
{
|
||||
sqlSugarClient.QueryFilter.AddTableFilter<IMultiTenant>(u => u.TenantId == GuidGenerator.Create());
|
||||
sqlSugarClient.QueryFilter.AddTableFilter<IMultiTenant>(u => u.TenantId == CurrentTenant.Id);
|
||||
}
|
||||
CustomDataFilter(sqlSugarClient);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
||||
|
||||
public async Task CommitAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
// await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync();
|
||||
await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -29,7 +29,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
||||
|
||||
public async Task RollbackAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
// await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync();
|
||||
await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
||||
);
|
||||
unitOfWork.AddTransactionApi(transactionApiKey, transaction);
|
||||
|
||||
// await dbContext.SqlSugarClient.Ado.BeginTranAsync();
|
||||
await dbContext.SqlSugarClient.Ado.BeginTranAsync();
|
||||
return dbContext;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user