Browse Source

Update Select(exp,true)

pull/29/head
sunkaixuan 2 years ago
parent
commit
9f3a8fcef5
  1. 9
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs
  2. 15
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs
  3. 6
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider11-12.cs

9
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs

@ -824,13 +824,14 @@ namespace SqlSugar
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2,T3, 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;
@ -1343,13 +1344,14 @@ namespace SqlSugar
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3,T4, 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;
@ -1993,13 +1995,14 @@ namespace SqlSugar
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4,T5, 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;

15
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider06-10.cs

@ -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;

6
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider11-12.cs

@ -254,13 +254,14 @@ namespace SqlSugar
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11, 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;
@ -809,13 +810,14 @@ namespace SqlSugar
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12, 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;

Loading…
Cancel
Save