v2.0.0-preview1119 #542 #537

This commit is contained in:
2881099
2020-11-18 10:17:11 +08:00
parent 8fdcc3ac5c
commit 60682936fa
24 changed files with 26 additions and 35 deletions

View File

@ -111,9 +111,9 @@ namespace FreeSql
var isCommited = false;
try
{
if (_tran != null && _tran.Connection != null)
if (_tran != null)
{
_tran.Commit();
if (_tran.Connection != null) _tran.Commit();
isCommited = true;
_fsql?.Aop.TraceAfterHandler?.Invoke(this, new Aop.TraceAfterEventArgs(_tranBefore, "提交", null));
@ -140,9 +140,9 @@ namespace FreeSql
var isRollbacked = false;
try
{
if (_tran != null && _tran.Connection != null)
if (_tran != null)
{
_tran.Rollback();
if (_tran.Connection != null) _tran.Rollback();
isRollbacked = true;
_fsql?.Aop.TraceAfterHandler?.Invoke(this, new Aop.TraceAfterEventArgs(_tranBefore, "回滚", null));
}