Browse Source

Synchronization code

pull/33/head
sunkaixuan 2 years ago
parent
commit
74a56f3619
  1. 4
      Src/Asp.NetCore2/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerQueryBuilder.cs

4
Src/Asp.NetCore2/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerQueryBuilder.cs

@ -38,6 +38,10 @@ namespace SqlSugar
result =this.Context.SqlQueryable<object>(result).Skip(Skip??0).Take(Take??0).ToSql().Key; result =this.Context.SqlQueryable<object>(result).Skip(Skip??0).Take(Take??0).ToSql().Key;
}
if (IsDistinct && oldTake == 1 && oldSkip == null)
{
result = result.Replace(" TOP 1 DISTINCT", " TOP 1 ");
} }
if (result.IndexOf("-- No table") > 0) if (result.IndexOf("-- No table") > 0)
{ {

Loading…
Cancel
Save