This commit is contained in:
sunkaixuan
2025-01-07 17:21:44 +08:00
parent 50ab88acf8
commit 5ec15e2b4f

View File

@@ -121,7 +121,11 @@ namespace SqlSugar
this.QueryBuilder.Includes == null && this.QueryBuilder.Includes == null &&
this.QueryBuilder.IsDistinct == false) this.QueryBuilder.IsDistinct == false)
{ {
if (StaticConfig.EnableAot)
{
var sqlobj = this.Clone().Select<int>(" COUNT(1) ").ToSql();
return this.Context.Ado.GetInt(sqlobj.Key,sqlobj.Value);
}
return this.Clone().Select<int>(" COUNT(1) ").ToList().FirstOrDefault(); return this.Clone().Select<int>(" COUNT(1) ").ToList().FirstOrDefault();
} }
MappingTableList expMapping; MappingTableList expMapping;