Ejemplo n.º 1
0
 /// <summary>
 /// IQueryableµ¹Ðò(desc)ÅÅÐò¡£
 /// <code>List&#60;T&#62; list = new List&#60;T&#62;();
 /// IQueryable&#60;T&#62; queryable = list.AsQueryable();
 /// queryable.OrderByDescending("SortField").ToList();</code>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="queryable"></param>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public static IQueryable <T> OrderByDescending <T>(this IQueryable <T> queryable, string propertyName)
 {
     return(QueryableSort <T> .OrderBy(queryable, propertyName, true));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// IQueryableÕýÐò(asc)ÅÅÐò¡£
 /// <code>List&#60;T&#62; list = new List&#60;T&#62;();
 /// IQueryable&#60;T&#62; queryable = list.AsQueryable();
 /// queryable.OrderBy("SortField").ToList();</code>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="queryable"></param>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public static IQueryable <T> OrderBy <T>(this IQueryable <T> queryable, string propertyName)
 {
     return(QueryableSort <T> .OrderBy(queryable, propertyName, false));
 }