diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index d85ea9278..0cc961e34 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1048,7 +1048,8 @@ namespace SqlSugar this.QueryBuilder.Take == null&& this.QueryBuilder.OrderByValue == null && this.QueryBuilder.PartitionByValue == null&& - this.QueryBuilder.SelectValue==null) + this.QueryBuilder.SelectValue==null&& + this.QueryBuilder.Includes == null) { return this.Clone().Select(" COUNT(1) ").ToList().First();