mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-07 18:04:55 +08:00
Optimize multi-tenant transactions
This commit is contained in:
@@ -620,6 +620,10 @@ namespace SqlSugar
|
|||||||
if (db.Context == null)
|
if (db.Context == null)
|
||||||
{
|
{
|
||||||
db.Context = new SqlSugarProvider(db.ConnectionConfig);
|
db.Context = new SqlSugarProvider(db.ConnectionConfig);
|
||||||
|
if (_IsAllTran&&db.Context.Ado.Transaction==null)
|
||||||
|
{
|
||||||
|
db.Context.Ado.BeginTran();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var intiAop=db.Context.Aop;
|
var intiAop=db.Context.Aop;
|
||||||
if (db.Context.CurrentConnectionConfig.AopEvents == null)
|
if (db.Context.CurrentConnectionConfig.AopEvents == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user