Update SimpleClient

This commit is contained in:
sunkaixuan 2018-01-31 17:06:16 +08:00
parent 46fdcf3af9
commit 4526357caa

View File

@ -39,6 +39,13 @@ namespace SqlSugar
page.PageCount = count;
return result;
}
public List<T> GetPageList<T>(List<IConditionalModel> conditionalList, PageModel page) where T : class, new()
{
int count = 0;
var result = Context.Queryable<T>().Where(conditionalList).ToPageList(page.PageIndex, page.PageSize, ref count);
page.PageCount = count;
return result;
}
public bool IsAny<T>(Expression<Func<T, bool>> whereExpression) where T : class, new()
{
return Context.Queryable<T>().Where(whereExpression).Any();
@ -117,6 +124,13 @@ namespace SqlSugar
page.PageCount = count;
return result;
}
public List<T> GetPageList(List<IConditionalModel> conditionalList, PageModel page)
{
int count = 0;
var result = Context.Queryable<T>().Where(conditionalList).ToPageList(page.PageIndex, page.PageSize, ref count);
page.PageCount = count;
return result;
}
public bool IsAny(Expression<Func<T, bool>> whereExpression)
{
return Context.Queryable<T>().Where(whereExpression).Any();