PS: if that's not supported, you can also try
var score = from s in NHibernateSession.Linq<Score>()
   where items.Contains (s.Item)
   select s;

On Sep 22, 11:03 am, Stefan Wenig <[email protected]> wrote:
> This would be the correct code:
>
> IList<Item> item = FromSomeSource();
> var score = from s in NHibernateSession.Linq<Score>()
>    join i in items on s.Item equals i
>   select s;
>
> Looks weird, but the thing is:
> - If you have a query source and join an in-memory collection to it,
> you create a query that receives the collection.
> - If you have an in-memory collection and join a query to it, the
> query is executed and then joined to the collection.
> Don't know if NH's LINQ provider supports this though (re-linq does).
>
> Technically, the reason is the parameter list of Queryable.Join:
> IQueryable<TOuter>, IEnumerable<TInner>. One could just create a new
> extension method that supports the other way too, but I'd be careful
> with that kind of ideas ;-)
>
> Cheers,
> Stefan
>
> On Sep 22, 12:02 am, Scott <[email protected]> wrote:
>
>
>
> > Can someone tell me why when I use the NHibernate Linq inhibitor it
> > gets the entire table when I trace it in Sql Profiler and if I use it
> > in the from it gets the entire table 1 record at a time.
>
> > Simple query
>
> > IList<Item> item = FromSomeSource();
> > var score = (from i in items
> >   join s in NHibernateSession.Linq<Score>() on i equals s.Item
> >   select s);- Hide quoted text -
>
> - Show quoted text -

-- 
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