Find() static private method

static private Find ( Expression source ) : List
source System.Linq.Expressions.Expression
return List
コード例 #1
0
        protected override Expression VisitSelect(SqlSelectExpression select)
        {
            select = (SqlSelectExpression)base.VisitSelect(select);

            // Expand all purely redundant subqueries

            var redundantQueries = SqlRedundantSubqueryFinder.Find(select.From);

            if (redundantQueries != null)
            {
                select = SubqueryRemover.Remove(select, redundantQueries);
            }

            return(select);
        }
コード例 #2
0
        protected override Expression VisitProjection(SqlProjectionExpression projection)
        {
            projection = (SqlProjectionExpression)base.VisitProjection(projection);

            if (projection.Select.From is SqlSelectExpression)
            {
                var redundantQueries = SqlRedundantSubqueryFinder.Find(projection.Select);

                if (redundantQueries != null)
                {
                    projection = SubqueryRemover.Remove(projection, redundantQueries);
                }
            }

            return(projection);
        }