/// <summary> /// Rolls back an uncommitted transaction when the object is disposed. /// </summary> public void Dispose() { if (Hibernator.HasOpenSession(SessionFactoryName)) { if ((!Transaction.WasCommitted) && (!Transaction.WasRolledBack)) { Hibernator.RollbackTransaction(SessionFactoryName); } } }
public static bool SessionExist(string sessionFactoryName) { return(Hibernator.HasOpenSession(sessionFactoryName)); }