mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-09 02:44:58 +08:00
Update Queryable.Count
This commit is contained in:
@@ -83,6 +83,12 @@ namespace OrmTest
|
|||||||
.Where(it => it.SchoolA.TeacherList.Any())
|
.Where(it => it.SchoolA.TeacherList.Any())
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
var xxxx = 0;
|
||||||
|
var pageList = db.Queryable<StudentA>()
|
||||||
|
.Includes(it => it.SchoolA, it => it.TeacherList)
|
||||||
|
.Where(it => it.SchoolA.TeacherList.Any())
|
||||||
|
.ToPageList(1, 2, ref xxxx);
|
||||||
|
|
||||||
var list3333 = db.Queryable<StudentA>()
|
var list3333 = db.Queryable<StudentA>()
|
||||||
.Includes(it => it.SchoolA, it => it.TeacherList)
|
.Includes(it => it.SchoolA, it => it.TeacherList)
|
||||||
.Where(it => it.SchoolA.TeacherList.Any(z=>z.Id>2))
|
.Where(it => it.SchoolA.TeacherList.Any(z=>z.Id>2))
|
||||||
|
|||||||
@@ -1048,7 +1048,8 @@ namespace SqlSugar
|
|||||||
this.QueryBuilder.Take == null&&
|
this.QueryBuilder.Take == null&&
|
||||||
this.QueryBuilder.OrderByValue == null &&
|
this.QueryBuilder.OrderByValue == null &&
|
||||||
this.QueryBuilder.PartitionByValue == null&&
|
this.QueryBuilder.PartitionByValue == null&&
|
||||||
this.QueryBuilder.SelectValue==null)
|
this.QueryBuilder.SelectValue==null&&
|
||||||
|
this.QueryBuilder.Includes == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
return this.Clone().Select<int>(" COUNT(1) ").ToList().First();
|
return this.Clone().Select<int>(" COUNT(1) ").ToList().First();
|
||||||
|
|||||||
Reference in New Issue
Block a user