mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Repair distinct count bug
This commit is contained in:
parent
ddfda2d463
commit
e3e4026e91
@ -1143,7 +1143,8 @@ namespace SqlSugar
|
||||
this.QueryBuilder.OrderByValue == null &&
|
||||
this.QueryBuilder.PartitionByValue == null&&
|
||||
this.QueryBuilder.SelectValue==null&&
|
||||
this.QueryBuilder.Includes == null)
|
||||
this.QueryBuilder.Includes == null&&
|
||||
this.QueryBuilder.IsDistinct==false)
|
||||
{
|
||||
|
||||
return this.Clone().Select<int>(" COUNT(1) ").ToList().First();
|
||||
@ -2154,7 +2155,8 @@ namespace SqlSugar
|
||||
this.QueryBuilder.OrderByValue == null &&
|
||||
this.QueryBuilder.PartitionByValue == null &&
|
||||
this.QueryBuilder.SelectValue == null &&
|
||||
this.QueryBuilder.Includes == null)
|
||||
this.QueryBuilder.Includes == null&&
|
||||
this.QueryBuilder.IsDistinct==false)
|
||||
{
|
||||
var list = await this.Clone().Select<int>(" COUNT(1) ").ToListAsync();
|
||||
return list.First();
|
||||
|
Loading…
Reference in New Issue
Block a user