Afaik, we can't have the same behavior (create & release session
inside the method boundaries) of Create, Find, etc because we don't
know when the query will be actually executed. So, the answer for your
question is yes.

Now that you bring a light on this, I think that is better to replace
the CreateSession by a lookup on the ThreadScopeInfo for a
RegisteredScope. What do you think about it?

On Mar 25, 11:41 pm, Dan Jasek <[email protected]> wrote:
> Looking at the code, AnctiveRecordLinqBase.Queryable never releases
> the ISession it creates.  This is contrary to Create, Find, etc. which
> all release their ISession after they are done with their work.
>
> Does this mean that a Queryable should always be used within a
> SessionScope?
> If you use it outside of a scope, will you leak ISessions?
>
> Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to