public List <T> QueryByMultiCondition <TKey>(Expression <Func <T, bool> > whereLambda, int pageindex , int pagesize , out int totalcount , Expression <Func <T, TKey> > order) { //1.0 计算跳过的总行数 int skipCount = (pageindex - 1) * pagesize; //2.0 获取满足条件的总行数 totalcount = _dbset.AsExpandable().Where(whereLambda).Count(); //totalcount = _dbset.Count(whereLambda); return(_dbset.AsExpandable().Where(whereLambda).AsQueryable().OrderByDescending(order).Skip(skipCount).Take(pagesize).ToList()); }