문제

Is Castle ActiveRecord's SessionScope exact equivalent of NHibernate's ISession? If yes, why Castle ActiveRecord has provided a duplicate feature? If no, what are their differences?

도움이 되었습니까?

해결책

SessionScope is basically a wrapper around NHibernate's ISession. It works as an ambient session, that is, there is the notion of an implicit "current" SessionScope, it's stackable and its storage is configurable via implementations of IThreadScopeInfo, like ThreadScopeInfo, WebThreadScopeInfo, and HybridWebThreadScopeInfo. This is similar to NHibernate's contextual sessions, however ActiveRecord has extended this concept to other implementations of scopes, such as TransactionScope and ConversationalScope.

More information in the ActiveRecord docs:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top