|
|
@ -244,13 +244,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5,T6, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
var clone = this.Select(expression).Clone(); |
|
|
|
var sql = clone.QueryBuilder.GetSelectValue; |
|
|
|
if (this.QueryBuilder.IsSingle() || string.IsNullOrEmpty(sql) || sql.Trim() == "*") |
|
|
|
{ |
|
|
|
return this.Select<TResult>(expression); |
|
|
|
} |
|
|
|
this.QueryBuilder.Parameters = clone.QueryBuilder.Parameters; |
|
|
|
this.QueryBuilder.SubToListParameters = clone.QueryBuilder.SubToListParameters; |
|
|
|
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
@ -871,13 +872,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6,T7, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
var clone = this.Select(expression).Clone(); |
|
|
|
var sql = clone.QueryBuilder.GetSelectValue; |
|
|
|
if (this.QueryBuilder.IsSingle() || string.IsNullOrEmpty(sql) || sql.Trim() == "*") |
|
|
|
{ |
|
|
|
return this.Select<TResult>(expression); |
|
|
|
} |
|
|
|
this.QueryBuilder.Parameters = clone.QueryBuilder.Parameters; |
|
|
|
this.QueryBuilder.SubToListParameters = clone.QueryBuilder.SubToListParameters; |
|
|
|
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
@ -1466,13 +1468,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7,T8, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
var clone = this.Select(expression).Clone(); |
|
|
|
var sql = clone.QueryBuilder.GetSelectValue; |
|
|
|
if (this.QueryBuilder.IsSingle() || string.IsNullOrEmpty(sql) || sql.Trim() == "*") |
|
|
|
{ |
|
|
|
return this.Select<TResult>(expression); |
|
|
|
} |
|
|
|
this.QueryBuilder.Parameters = clone.QueryBuilder.Parameters; |
|
|
|
this.QueryBuilder.SubToListParameters = clone.QueryBuilder.SubToListParameters; |
|
|
|
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
@ -1999,13 +2002,14 @@ namespace SqlSugar |
|
|
|
#region Select
|
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8,T9, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
var clone = this.Select(expression).Clone(); |
|
|
|
var sql = clone.QueryBuilder.GetSelectValue; |
|
|
|
if (this.QueryBuilder.IsSingle() || string.IsNullOrEmpty(sql) || sql.Trim() == "*") |
|
|
|
{ |
|
|
|
return this.Select<TResult>(expression); |
|
|
|
} |
|
|
|
this.QueryBuilder.Parameters = clone.QueryBuilder.Parameters; |
|
|
|
this.QueryBuilder.SubToListParameters = clone.QueryBuilder.SubToListParameters; |
|
|
|
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
@ -2579,13 +2583,14 @@ namespace SqlSugar |
|
|
|
#region Select
|
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9,T10, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
var clone = this.Select(expression).Clone(); |
|
|
|
var sql = clone.QueryBuilder.GetSelectValue; |
|
|
|
if (this.QueryBuilder.IsSingle() || string.IsNullOrEmpty(sql) || sql.Trim() == "*") |
|
|
|
{ |
|
|
|
return this.Select<TResult>(expression); |
|
|
|
} |
|
|
|
this.QueryBuilder.Parameters = clone.QueryBuilder.Parameters; |
|
|
|
this.QueryBuilder.SubToListParameters = clone.QueryBuilder.SubToListParameters; |
|
|
|
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|