Andrei Alecu
unread,May 5, 2011, 8:12:49 PM5/5/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
Is it possible to generate a *single* query to the database, like:
select sum(x.value), count(*) from sometable
With NHibernate Linq?
I was able to do this with HQL and with QueryOver using
ProjectionList, but I can't seem to be able to find how to do it with
Linq.
Note that there's no grouping involved, I believe that if I had a
grouping I could've used GroupBy() and the query would've gotten
translated properly into one database hit.
If I need to tap into some deeply hidden Linq to HQL converters to do
it, it's fine, if only someone could point me in the right direction.
Thanks!