Thanks a lot to both of you - 

uNHAddins.WCF helped me to start not only NHibernate per request, but actually 
our inhouse framework's context (which has a context around a context around an 
NHibernate session). I only needed to copy and tweak the NHContextPerCall 
attribute and the NhSessionPerCallContextBehavior - altogether about 50 lines 
of code (including {} ;-) ).

Works like a charm, as they say ...

[Although ... I'm not sure I understand *why* it works - I thought that the 
IQueryable including its NHibernate provider, which in turn has a pointer to 
the session, is held stateful in the WCF-Server/RIA-Server. But if we do 
"session per request", this would not work, as the session would be stale on 
the next call. Sooooooo ... IQueryables are obviously *not* held stateful <- my 
error. But this is not an NHibernate question, so kindly disregard it (unless 
you have a quick answer to enhance my "know"ledge].

Regards & thx again
Harald M.

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!                       
Jetzt informieren: http://www.gmx.net/de/go/freephone

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to