public void Commit() { SessionFactory.CommitTransaction(this); if (TransactionContext != null) { TransactionContext.Commit(); } }