开发者

NHibernate MVVM Session Best Practice

开发者 https://www.devze.com 2022-12-28 05:08 出处:网络
What is the best place to store the NHibernate session if we only need one? In the main windows view model?

What is the best place to store the NHibernate session if we only need one?

In the main windows view model?

In the app?

In the DataAcc开发者_如何学运维ess Class?


You should read Oren Eini's MSDN article on Building a Desktop To-Do application with NHibernate. He goes into detail about creating and managing the lifetime of an NHibernate session, as well as two-way databinding and propagating entity changes.

I believe he's using some variant of MVP or MVVM in his examples, though he doesn't mention it by name.

0

精彩评论

暂无评论...
验证码 换一张
取 消