/// <summary> /// Configures how a query's results should be ordered. /// See the docs for more information on "Table Sorting". /// </summary> public TBuilder SortAsTable <TControl>(Action <TableSortBuilder <TRequest, TEntity, TControl> > configure) { var builder = new TableSortBuilder <TRequest, TEntity, TControl>(); configure(builder); var sorterFactory = builder.Build(); return(SetSorter(sorterFactory)); }
public static TBuilder SortAsTable <TBuilder, TRequest, TEntity, TControl>( this RequestEntityConfigBuilderCommon <TRequest, TEntity, TBuilder> config, Func <TRequest, TControl> getControlValue, Action <TableSortBuilder <TRequest, TEntity, TControl> > configure) where TEntity : class where TBuilder : RequestEntityConfigBuilderCommon <TRequest, TEntity, TBuilder> { var builder = new TableSortBuilder <TRequest, TEntity, TControl>() .WithControl(getControlValue, SortDirection.Default); configure(builder); return(config.SetSorter(builder.Build())); }