コード例 #1
0
ファイル: SessionFactoryImpl.cs プロジェクト: PeterJee/vtms
 public ISession GetCurrentSession()
 {
     if (currentSessionContext == null)
     {
         throw new HibernateException("No CurrentSessionContext configured (set the property "
                                      + Environment.CurrentSessionContextClass + ")!");
     }
     return(currentSessionContext.CurrentSession());
 }
コード例 #2
0
 public ISession GetCurrentSession()
 {
     return(currentSessionContext != null?currentSessionContext.CurrentSession() : null);
 }