NHibernate Win Forms Session Management

后端 未结 3 1369
抹茶落季
抹茶落季 2020-12-29 12:53

I have used NHibernate in web applications before. I must admit that I am still learning NHibernate and do not totally grasp the art of session management. So I would like t

相关标签:
3条回答
  • 2020-12-29 13:29

    Here are some good pointers on this subject.

    0 讨论(0)
  • 2020-12-29 13:32

    uNHAddins has support for session-per-business-transaction. We are using it on a WinForms app.

    http://gustavoringel.blogspot.com/2009/02/unhaddins-persistence-conversation-part.html

    0 讨论(0)
  • 2020-12-29 13:34

    There is already a pattern established for managing NHibernate sessions in WinForms applications called Conversation per business transaction. A good description can be found here:

    http://fabiomaulo.blogspot.com/2008/12/conversation-per-business-transaction.html http://fabiomaulo.blogspot.com/2009/01/using-conversation-per-business.html

    Basically it uses a conversation abstraction: it can start, pause, resume, end. Each operation does automatic session and transaction management. I highly recommend it, definitely worth taking a look.

    0 讨论(0)
提交回复
热议问题