mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
#503 处理外部using 掉DbTransaction的情况
This commit is contained in:
parent
2947572f05
commit
4ae78b1dd1
@ -111,7 +111,7 @@ namespace FreeSql
|
||||
var isCommited = false;
|
||||
try
|
||||
{
|
||||
if (_tran != null)
|
||||
if (_tran != null && _tran.Connection != null)
|
||||
{
|
||||
_tran.Commit();
|
||||
isCommited = true;
|
||||
@ -140,7 +140,7 @@ namespace FreeSql
|
||||
var isRollbacked = false;
|
||||
try
|
||||
{
|
||||
if (_tran != null)
|
||||
if (_tran != null && _tran.Connection != null)
|
||||
{
|
||||
_tran.Rollback();
|
||||
isRollbacked = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user