unhaddins

What is the best NHibernate session management approach for using in a multithread windows service application?

天涯浪子 提交于 2019-11-28 05:31:46
I have a windows service application that work with multithread. I use NHibernate in data access layer of this application. What is your suggestion for session management in this application. I read about UNHAddins, Is it a good solution? I use NHibernate's built in contextual sessions. You can read about them here: http://nhibernate.info/doc/nhibernate-reference/architecture.html#architecture-current-session Here is an example of how I use this: public class SessionFactory { protected static ISessionFactory sessionFactory; private static ILog log = LogManager.GetLogger(typeof(SessionFactory))

What is the best NHibernate session management approach for using in a multithread windows service application?

倖福魔咒の 提交于 2019-11-27 01:02:45
问题 I have a windows service application that work with multithread. I use NHibernate in data access layer of this application. What is your suggestion for session management in this application. I read about UNHAddins, Is it a good solution? 回答1: I use NHibernate's built in contextual sessions. You can read about them here: http://nhibernate.info/doc/nhibernate-reference/architecture.html#architecture-current-session Here is an example of how I use this: public class SessionFactory { protected