Here's the details:
http://stackoverflow.com/questions/21586747/adding-multiple-order-by-clauses-to-an-nhibernate-query-throws-exception
But basically, this query works:
// Query for all ingredients, most used ingredients first
var ingredients = (from ing in session.Query<Ingredients>()
orderby ((from p in session.Query<RecipeIngredients>()
where p.Ingredient == ing
select p.RecipeIngredientId).Count()) descending
select new IngredientSource(ing.IngredientId,
ing.DisplayName));
This throws an exception:
var ingredients = (from ing in session.Query<Ingredients>()
orderby ((from p in session.Query<RecipeIngredients>()
where p.Ingredient == ing
select p.RecipeIngredientId).Count())
descending,
ing.DisplayName
select new IngredientSource(ing.IngredientId,
ing.DisplayName));
Any work around?
Mike
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.