MCQs > IT & Programming > C# > Assume 2 columns are named Product and Category. How can they be sorted based on first by category and then by product name?

C# MCQs

Assume 2 columns are named Product and Category. How can they be sorted based on first by category and then by product name? 

Answer

Correct Answer: var sortedProds = _db.Products.Orderby(c => c.Category) . ThenBy(n => n.Name)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it