/// <summary> /// Adds an order by clause to the query, where the order by clause will be in descending order. /// </summary> /// <typeparam name="TRecord">The record type of the query builder</typeparam> /// <param name="queryBuilder">The query builder</param> /// <param name="expression">An expression to return a column from a record. This will be used to determine the name of the column that the query should be ordered by</param> /// <returns>The query builder that can be used to further modify the query, or execute the query</returns> public static IOrderedQueryBuilder <TRecord> ThenByDescending <TRecord>(this IOrderedQueryBuilder <TRecord> queryBuilder, Expression <Func <TRecord, object> > expression) where TRecord : class => queryBuilder.ThenByDescending(GetColumnName(expression.Body));
public static IOrderedQueryBuilder <TRecord> ThenBy <TRecord>(this IOrderedQueryBuilder <TRecord> queryBuilder, string orderByClause) where TRecord : class { return(queryBuilder.OrderBy(orderByClause)); }