Browse Source

Update SimpleClient

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
4526357caa
  1. 14
      Src/Asp.Net/SqlSugar/SimpleClient.cs

14
Src/Asp.Net/SqlSugar/SimpleClient.cs

@ -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();

Loading…
Cancel
Save