在主方法和子方法都存在TransactionAttribute 的情况下。会出异常。AspectCore.DynamicProxy.AspectInvocationException: Exception has been thrown by the aspect of an invocation. ---> Before RollbackTransaction,Please BeginTransaction first!. ---> SmartSql.Exceptions.SmartSqlException: Before RollbackTransaction,Please BeginTransaction first!
在主方法和子方法都存在TransactionAttribute 的情况下。会出异常。AspectCore.DynamicProxy.AspectInvocationException: Exception has been thrown by the aspect of an invocation. ---> Before RollbackTransaction,Please BeginTransaction first!. ---> SmartSql.Exceptions.SmartSqlException: Before RollbackTransaction,Please BeginTransaction first!
如果能在 Invoke 里面判断一下当前事务状态话,在事务已经Begin之后就不要再操作事务了。这样应该可以解决这个问题。