Hi, I have such a request
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 that I created like this.
public class CustomerProfit
{
public String Name;
public Decimal Profit;
}
Can this be done? and how, or can this custom query be executed in HQL?
source
share