mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-29 01:44:41 +08:00
Repair distinct count bug
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user