【问题标题】:Is SessionScope exact equivalent of ISession?SessionScope 是否完全等同于 ISession?
【发布时间】:2010-10-02 09:50:19
【问题描述】:

Castle ActiveRecord 的 SessionScope 是否完全等同于 NHibernate 的 ISession?如果是,为什么 Castle ActiveRecord 提供了重复的功能?如果不是,它们的区别是什么?

【问题讨论】:

    标签: nhibernate castle-activerecord isession session-scope


    【解决方案1】:

    SessionScope 基本上是 NHibernate 的 ISession 的包装器。它作为一个环境会话工作,也就是说,有一个隐含的“当前”SessionScope 的概念,它是可堆叠的,并且它的存储可以通过 IThreadScopeInfo 的实现来配置,例如 ThreadScopeInfo、WebThreadScopeInfo 和 HybridWebThreadScopeInfo。这类似于NHibernate's contextual sessions,但 ActiveRecord 已将此概念扩展到范围的其他实现,例如 TransactionScope 和 ConversationalScope。

    ActiveRecord 文档中的更多信息:

    【讨论】:

    • 链接好像失效了
    猜你喜欢
    • 2021-10-26
    • 1970-01-01
    • 1970-01-01
    • 2018-07-10
    • 1970-01-01
    • 2023-03-19
    • 2013-07-09
    • 2020-03-05
    • 1970-01-01
    相关资源
    最近更新 更多