using Infrastructure; using OpenAuth.App.Base; using OpenAuth.Repository; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenAuth.App.BaseApp.Base; namespace OpenAuth.App { public class TableRecordApp : SqlSugarBaseApp { public TableRecordApp(ISugarUnitOfWork unitWork, ISimpleClient repository) : base(unitWork, repository, null) { } public Response>> LoadTableRecordList(string keyword, int pageindex, int pagesize) { //定义且实例化分页数据 int totalCount = 0; //数据查询并返回 var info = this.Repository.AsQueryable() .WhereIF(!string.IsNullOrEmpty(keyword), t => t.TableName.Contains(keyword)) .ToPageList(pageindex, pagesize, ref totalCount); return new Response>> { Result = new PageInfo> { Items = info, Total = totalCount } }; } } }