'NestedNHibernateSessionManager'的类型初始值设定项引发了异常

时间:2013-12-05 07:26:38

标签: nhibernate

public static ISession OpenSession() {
    // The type initializer for'NestedNHibernateSessionManager' throws 
    //   an exception here.
    if (NHibernateSessionManager.SessionFactory.GetCurrentSession() == null) 
      return NHibernateSessionManager.SessionFactory.OpenSession();
    else
      return NHibernateSessionManager.SessionFactory.GetCurrentSession();
}

我有一个调用另一个项目中的方法的服务。

该项目中的课程发起ISession session = GetSession(); 上面提到这个错误。

这可能是什么原因?

0 个答案:

没有答案