Hello
I very recently discovered nhibernate session scoping and contexts. It seems that using this for a desktop app is as simple as bootstrapping the configuration with a ThreadStaticSessionContext, binding the session factory to the context, and then just calling sessioonFactory.GetCurrentSession() as needed.
I am looking for experienced nhib devs that may have any opinions, tips, and/or links re:
(1) why this is or isn't a good approach for a desktop application
(2) unit testing with mocks
(3) what to do when you want a IStatelessSession
(4) how this scales when the app needs web fuctionality.
Cheers,
Berryl