/// <summary> /// 获取查询结果 /// </summary> /// <param name="queryable"></param> /// <param name="query"></param> /// <returns></returns> private IQueryable <TEntity> GetQueryResult(IQueryable <TEntity> queryable, IQueryBase <TEntity> query) { queryable = queryable.Where(query); var order = query.GetOrder(); return(string.IsNullOrWhiteSpace(order) ? queryable : queryable.OrderBy(order)); }
protected IQueryable <TEntity> Query(IQueryable <TEntity> queryable, IQueryBase <TEntity> query) { queryable = queryable.Where(query); var order = query.GetOrder(); return(string.IsNullOrWhiteSpace(order) ? queryable : queryable.OrderBy(order)); }
public async Task <PagerList <TEntity> > PagerQueryAsNoTrackingAsync(IQueryBase <TEntity> query) { var order = query.GetOrder(); if (string.IsNullOrWhiteSpace(order)) { order = "Id"; } return(TableNoTracking.Where(query).OrderBy(order).ToPagerList(query.GetPager())); }
public PagerList <TEntity> PagerQuery(IQueryBase <TEntity> query) { var order = query.GetOrder(); if (string.IsNullOrWhiteSpace(order)) { order = "Id"; } return(FindAll().Where(query).OrderBy(order).ToPagerList(query.GetPager())); }