Assume 2 Columns Named As Product And Category How Can Be Both #642
Assume 2 columns named as Product and Category how can be both sorted out based on first by category and then by product name?
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Delegates, Generics and LINQ - Fundamental of LINQ - Quiz No.1.
Assume 2 columns named as Product and Category how can be both sorted out based on first by category and then by product name?
var sortedProds = _db.Products.Orderby(c => c.Category)
var sortedProds = _db.Products.Orderby(c => c.Category) + ThenBy(n => n.Name)
var sortedProds = _db.Products.Orderby(c => c.Category) . ThenBy(n => n.Name)
all of the mentioned