Hi i have a query like this
SELECT Customer.Name, sum([Load].Profit) as Profit FROM Customer INNER JOIN [Load] ON Customer.Id = [Load].CustomerId GROUP BY Customer.Name
I need to execute this query in nhibernate and map it to a Custom domain object which i created as like this
public class CustomerProfit
{
public String Name;
public Decimal Profit;
}
Is it possible to do so ? and how , or is it possible to execute this custom query in HQL ?