Yes, you are using ThenBy
:
product.OrderByDescending(m => m.ProductScore).ThenBy(m => m.ProductId)
(and similarly to ThenByDescending
). This is a Queryable.ThenBy
link; There is an equivalent on Enumerable
, of course.
In the query expression, this will be:
var query = from product in db.Products orderby product.ProductScore descending, product.ProductId select product;
ThenBy
and ThenByDescending
can only be called on IOrderedQueryable
/ IOrderedEnumerable
... see my Edulinq article on this entry for more information .
source share