I have a model containing a DateTime field and a Price field. I want to get a list that gives me the aggregation of the month / year - the price is therefore for the data:
I will get:
So far, I have not found a way to achieve this with QueryOver. I keep getting “cannot resolve property” when I try to see parts of the month / year of the date.
These questions:
Grouping by year, then by month
Group / Sort by date Year / Month, Partial selection using NHibernate (Projection Transformation?)
got the answer using LINQ - not what I'm looking for.
Any ideas? Thanks
(using NHibernate 3.2)
QueryOver , SQL. QueryOver , .
QueryOver, - :
session.QueryOver<...>() .SelectList(list => list .Select(GroupProperty(Projections.SqlProjection(...))) .SelectSum(x => x.Price) );