Page 1 of 1

Assume 2 columns named as Product and Category how can be both sorted out based on first by category and then by product

Posted: Wed Jul 13, 2022 7:57 pm
by answerhappygod
a) var sortedProds = _db.Products.Orderby(c => c.Category)
b) var sortedProds = _db.Products.Orderby(c => c.Category) + ThenBy(n => n.Name)
c) var sortedProds = _db.Products.Orderby(c => c.Category) . ThenBy(n => n.Name)
d) all of the mentioned