diff --git a/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs index d8526a8f1..8951d0b0d 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs @@ -110,6 +110,7 @@ namespace SqlSugar public abstract string SqlTranslationRight { get; } public virtual string SqlFalse { get { return "1=2 "; } } public virtual string SqlDateNow { get { return "GETDATE()"; } } + public virtual string SqlSelectAll { get { return "*"; } } #endregion } } diff --git a/Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs b/Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs index f39a6d777..cec2a55fc 100644 --- a/Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Data; +using System.Dynamic; using System.Linq; +using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace SqlSugar @@ -12,8 +14,7 @@ namespace SqlSugar CommandType CommandType { get; set; } String AppendWhereOrAnd(bool isWhere, string sqlString); string AppendHaving(string sqlString); - string SqlTranslationLeft { get; } - string SqlTranslationRight { get; } + SqlQueryBuilder SqlQueryBuilder { get; set; } QueryBuilder QueryBuilder { get; set; } InsertBuilder InsertBuilder { get; set; } @@ -23,6 +24,9 @@ namespace SqlSugar string SqlParameterKeyWord { get; } string SqlFalse { get; } string SqlDateNow { get; } + string SqlTranslationLeft { get; } + string SqlTranslationRight { get; } + string SqlSelectAll { get; } string GetTranslationTableName(string name); string GetTranslationColumnName(string entityName, string propertyName); diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index d5fc40bd7..a04f8e4e4 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs @@ -333,7 +333,7 @@ namespace SqlSugar var allParameters = allItems.SelectMany(it => it.Value).ToArray(); var resulut = base.Context.Queryable().AS(UtilMethods.GetPackTable(allSql, "unionTable")); resulut.AddParameters(allParameters); - return resulut.Select("*"); + return resulut.Select(sqlBuilder.SqlSelectAll); } public virtual ISugarQueryable UnionAll(List> queryables) where T : class, new() {