From fec394c3de9989f6caa8fe7cc65c28f784d5b198 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 11 Nov 2018 18:16:29 +0800 Subject: [PATCH] - --- .../Abstract/QueryableProvider/QueryableProvider.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 936218a35..d322fb8df 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1270,6 +1270,11 @@ namespace SqlSugar asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true; var asyncQueryable = asyncContext.Queryable().Select(string.Empty).WithCacheIF(IsCache, CacheTime); + CopyQueryBuilder(asyncQueryable); return asyncQueryable; + } + + private void CopyQueryBuilder(ISugarQueryable asyncQueryable) + { var asyncQueryableBuilder = asyncQueryable.QueryBuilder; asyncQueryableBuilder.Take = this.QueryBuilder.Take; asyncQueryableBuilder.Skip = this.QueryBuilder.Skip; @@ -1290,7 +1295,6 @@ namespace SqlSugar asyncQueryableBuilder.JoinExpression = this.QueryBuilder.JoinExpression; asyncQueryableBuilder.WhereIndex = this.QueryBuilder.WhereIndex; asyncQueryableBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; - return asyncQueryable; } #endregion }