Your application includes a collection of Product entities named products. You need to create a LINQ query to sort Product entities first by a property named Category and then by a property named ProductName.

Which query should you use?

 Posted by Rajkatie on 8/31/2012 | Category: ADO.NET Interview questions | Views: 1001 | Points: 40
Select from following answers:
  1. from p in products orderby p.Category, p.ProductName select p
  2. from p in products orderby p.ProductName, p.Category select p;
  3. from p1 in products orderby p1.Category, from p2 in products orderby p2.ProductName select p2 select p1
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response