public void OnEnlist(Zongsoft.Transactions.EnlistmentContext context) { if (context.Phase == Zongsoft.Transactions.EnlistmentPhase.Prepare) { return; } bool?commit = null; switch (context.Phase) { case Transactions.EnlistmentPhase.Commit: commit = true; break; case Transactions.EnlistmentPhase.Abort: case Transactions.EnlistmentPhase.Rollback: commit = false; break; } _session.Complete(commit); }