From 4526357caac092299e9c3ce4ccdfb7e402fbb5e2 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 31 Jan 2018 17:06:16 +0800 Subject: [PATCH] Update SimpleClient --- Src/Asp.Net/SqlSugar/SimpleClient.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/SimpleClient.cs b/Src/Asp.Net/SqlSugar/SimpleClient.cs index 5ecdc98f4..e0059f5ac 100644 --- a/Src/Asp.Net/SqlSugar/SimpleClient.cs +++ b/Src/Asp.Net/SqlSugar/SimpleClient.cs @@ -39,6 +39,13 @@ namespace SqlSugar page.PageCount = count; return result; } + public List GetPageList(List conditionalList, PageModel page) where T : class, new() + { + int count = 0; + var result = Context.Queryable().Where(conditionalList).ToPageList(page.PageIndex, page.PageSize, ref count); + page.PageCount = count; + return result; + } public bool IsAny(Expression> whereExpression) where T : class, new() { return Context.Queryable().Where(whereExpression).Any(); @@ -117,6 +124,13 @@ namespace SqlSugar page.PageCount = count; return result; } + public List GetPageList(List conditionalList, PageModel page) + { + int count = 0; + var result = Context.Queryable().Where(conditionalList).ToPageList(page.PageIndex, page.PageSize, ref count); + page.PageCount = count; + return result; + } public bool IsAny(Expression> whereExpression) { return Context.Queryable().Where(whereExpression).Any();