标签:ret fun add count div class 分页 pre lis
/// <summary> /// 分页2 /// </summary> /// <param name="current"></param> /// <param name="pageSize"></param> /// <param name="total"></param> /// <param name="productIds"></param> /// <param name="countryIds"></param> /// <returns></returns> public List<ProdCountry> ListEntities(int current, int pageSize, out int total, Func<ProdCountry, bool> func) { List<ProdCountry> list = ReadRedis(); if (list == null || list.Count <= 0) { list = ReadDatabase(); } var query = list.AsQueryable().Where(func); total = query.Count(); return query.Skip((current - 1) * pageSize).Take(pageSize).ToList(); }
var dd = new Func<ProdCountry, bool>(delegate (ProdCountry obj) { return obj.CountryId > 0; });
标签:ret fun add count div class 分页 pre lis
原文地址:https://www.cnblogs.com/lishidefengchen/p/13260035.html