|
|
@ -244,11 +244,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5,T6, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var sql = this.Clone().Select(expression).QueryBuilder.GetSelectValue; |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
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.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|
sql = AppendSelect<T>(sql, parameters, columnsResult, 0); |
|
|
@ -868,11 +871,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6,T7, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var sql = this.Clone().Select(expression).QueryBuilder.GetSelectValue; |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
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.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|
sql = AppendSelect<T>(sql, parameters, columnsResult, 0); |
|
|
@ -1460,11 +1466,14 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7,T8, TResult>> expression, bool isAutoFill) |
|
|
|
{ |
|
|
|
var sql = this.Clone().Select(expression).QueryBuilder.GetSelectValue; |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
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.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|
sql = AppendSelect<T>(sql, parameters, columnsResult, 0); |
|
|
@ -1990,11 +1999,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 sql = this.Clone().Select(expression).QueryBuilder.GetSelectValue; |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
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.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|
sql = AppendSelect<T>(sql, parameters, columnsResult, 0); |
|
|
@ -2567,11 +2579,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 sql = this.Clone().Select(expression).QueryBuilder.GetSelectValue; |
|
|
|
var clone = this.Clone().Select(expression); |
|
|
|
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.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; |
|
|
|
var parameters = (expression as LambdaExpression).Parameters; |
|
|
|
var columnsResult = this.Context.EntityMaintenance.GetEntityInfo<TResult>().Columns; |
|
|
|
sql = AppendSelect<T>(sql, parameters, columnsResult, 0); |
|
|
|