How to use NHibernate.Burrow with winform/desktop application?
-
25-09-2019 - |
문제
1) Is it possible to use Burrow with winforms application or WPF application?
2) Are there any samples how to configure Burrow with winforms app.
해결책
Even if it is possible - you should not. Burrow uses HttpModule to configure ISession, ISessionFactory lifetime.
You won't get anything usefull from burrow except implementation of DAO objects and some base classes for entities. I think you better move the source code of required parts in your application and use them.
다른 팁
What about using
new NHibernate.Burrow.BurrowFramework.InitWorkSpace();
new NHibernate.Burrow.BurrowFramework.CloseWorkSpace();
These methods create and destroy the Session without using httpModule. So it can be used in unittests where u cannot supply the module. => what about winforms apps? The question is still opened
제휴하지 않습니다 StackOverflow