Assume 2 columns named as ProductName and ProductCategory.How can be both sorted out based on first by ProductCategory and then by ProductName?

 Posted by Rajnilari2015 on 3/23/2016 | Category: C# Interview questions | Views: 1863 | Points: 40
Select from following answers:
  1. var sortedProds = _db.Products.Orderby(c => c.ProductCategory)
  2. var sortedProds = _db.Products.Orderby(c => c.ProductCategory) + ThenBy(n => n.ProductName)
  3. var sortedProds = _db.Products.Orderby(c => c.ProductCategory) . ThenBy(n => n.ProductName)
  4. All of the mentioned
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response