From 9154a88e155840ec8359d14e905fc24b0d4c33bd Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 20 Sep 2022 21:39:19 +0800 Subject: [PATCH] Update db.Queryable --- .../SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs | 4 ++-- .../SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs | 2 +- Src/Asp.Net/SqlSugar/Interface/ISqlSugarClient.cs | 2 +- Src/Asp.Net/SqlSugar/SqlSugarClient.cs | 2 +- Src/Asp.Net/SqlSugar/SqlSugarScope.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs index 890a9613c..48dbacbe6 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs @@ -407,10 +407,10 @@ namespace SqlSugar queryable.Where(joinExpression); return queryable; } - public virtual ISugarQueryable Queryable(ISugarQueryable queryable) where T : class, new() + public virtual ISugarQueryable Queryable(ISugarQueryable queryable) { var sqlobj = queryable.ToSql(); - var result = this.SqlQueryable(sqlobj.Key).AddParameters(sqlobj.Value); + var result = this.SqlQueryable(sqlobj.Key).AddParameters(sqlobj.Value).Select("*"); result.QueryBuilder.IsSqlQuery = false; return result; } diff --git a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs index eee6023e4..12cddc58b 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs @@ -454,7 +454,7 @@ namespace SqlSugar return ScopedContext.Queryable(); } - public ISugarQueryable Queryable(ISugarQueryable queryable) where T : class, new() + public ISugarQueryable Queryable(ISugarQueryable queryable) { return ScopedContext.Queryable(queryable); } diff --git a/Src/Asp.Net/SqlSugar/Interface/ISqlSugarClient.cs b/Src/Asp.Net/SqlSugar/Interface/ISqlSugarClient.cs index 26ad3abbe..961bd2645 100644 --- a/Src/Asp.Net/SqlSugar/Interface/ISqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/Interface/ISqlSugarClient.cs @@ -131,7 +131,7 @@ namespace SqlSugar where T3 : class, new() where T4 : class, new(); ISugarQueryable Queryable(); - ISugarQueryable Queryable(ISugarQueryable queryable) where T : class, new(); + ISugarQueryable Queryable(ISugarQueryable queryable); ISugarQueryable Queryable(string shortName); #endregion diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index 431f4aed4..d7a2e7f8a 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs @@ -429,7 +429,7 @@ namespace SqlSugar return this.Context.Queryable(); } - public ISugarQueryable Queryable(ISugarQueryable queryable) where T : class, new() + public ISugarQueryable Queryable(ISugarQueryable queryable) { var result= this.Context.Queryable(queryable); diff --git a/Src/Asp.Net/SqlSugar/SqlSugarScope.cs b/Src/Asp.Net/SqlSugar/SqlSugarScope.cs index 5d2b9b4d2..eacce3062 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarScope.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarScope.cs @@ -440,7 +440,7 @@ namespace SqlSugar return ScopedContext.Queryable(); } - public ISugarQueryable Queryable(ISugarQueryable queryable) where T : class, new() + public ISugarQueryable Queryable(ISugarQueryable queryable) { return ScopedContext.Queryable(queryable); }