mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Bug: distinct top 1
This commit is contained in:
parent
494647b0b1
commit
ef28d6d955
@ -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…
Reference in New Issue
Block a user