Remotion.Linq.SqlBackend.SqlPreparation.SqlPreparationSubStatementTableFactory.GetNewSelectExpressionWithOrderings C# (CSharp) Метод

GetNewSelectExpressionWithOrderings() приватный Метод

private GetNewSelectExpressionWithOrderings ( SqlStatement sqlStatement ) : Expression
sqlStatement Remotion.Linq.SqlBackend.SqlStatementModel.SqlStatement
Результат System.Linq.Expressions.Expression
    private Expression GetNewSelectExpressionWithOrderings (SqlStatement sqlStatement)
    {
      // wrap original select projection and all orderings into a large tuple expression (new { proj, new { o1, new { o2, ... }}})
      var expressionsToBeTupelized = new[] { sqlStatement.SelectProjection }.Concat (sqlStatement.Orderings.Select (o => o.Expression));
      var tupleExpression = TupleExpressionBuilder.AggregateExpressionsIntoTuple (expressionsToBeTupelized);
      
      var preparedTupleExpression = _stage.PrepareSelectExpression (tupleExpression, _context);
      if (preparedTupleExpression.Type != tupleExpression.Type)
        throw new InvalidOperationException ("The SQL Preparation stage must not change the type of the select projection.");
      
      return preparedTupleExpression;
    }