Exemplo n.º 1
0
 public static AdvanceDataSourceRequest Create(AdvanceDataSourceRequest request)
 {
     return(Create(request.Sort, request.Filter, request.Take, request.Skip, request.Aggregates));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 生成查询结果
 /// </summary>
 /// <typeparam name="T">数据类型</typeparam>
 /// <param name="queryable">查询</param>
 /// <param name="request">请求参数</param>
 /// <returns>查询结果</returns>
 public static DataSourceResult ToDataSourceResult <T>(this IQueryable <T> queryable, AdvanceDataSourceRequest request)
 {
     request = AdvanceDataSourceRequest.Create(request);
     return(queryable.ToDataSourceResult(request.Take, request.Skip, request.Sort, request.Filter, request.Aggregates));
 }