Update SqlQueryable bug

This commit is contained in:
sunkaixuan 2023-05-19 11:50:25 +08:00
parent 94ffcf2f2d
commit 29874ce4e2

View File

@ -686,7 +686,7 @@ namespace SqlSugar
{ {
return result; return result;
} }
if (this.IsSqlQuery&&this.OldSql.HasValue() && (Skip == null && Take == null) && (this.WhereInfos == null || this.WhereInfos.Count == 0)) if (!string.IsNullOrEmpty(OrderByValue)&&this.IsSqlQuery&&this.OldSql.HasValue() && (Skip == null && Take == null) && (this.WhereInfos == null || this.WhereInfos.Count == 0))
{ {
return this.OldSql; return this.OldSql;
} }