Foo has a name.
Bar links foo. I have a collection with bars.
I need a collection with Foo.Title.
If I have 10 bars in the collection, I will call db 10 times.
bars.Select (x => x.Foo.Title)
Right now (using NHibernate Linq and I don't want to drop it) retrieves the Bar collection.
var q = from b in Session.Linq<Bar>() where ... select b;
I read that Ayende talks about this .
Another related question .
A bit of documentation .
And one more related message.
Maybe this can help?
What about this one ?
Perhaps MultiQuery is what I need?: /
But I still canโt โcompileโ this in the correct solution.
How to avoid choosing n + 1?
select-n-plus-1 nhibernate domain-driven-design fluent-nhibernate linq-to-nhibernate
Arnis lapsa
source share