tags:

views:

91

answers:

2

How to specify descending in extension method

var qry=from p in context.Persons 
                   orderby p.salary descending select p;

extension method

var qry=context.Persons.OrderBy(c=>c.salary);
+6  A: 

Use

var qry=context.Persons.OrderByDescending(c=>c.salary);

J. Steen
+2  A: 

Use:

var qry=context.Persons.OrderByDescending(c=>c.salary);
LBushkin