/// <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);
         }
     }
 }
Exemplo n.º 2
0
 public static bool SessionExist(string sessionFactoryName)
 {
     return(Hibernator.HasOpenSession(sessionFactoryName));
 }