Ejemplo n.º 1
0
        public override DbExpression Visit(DbSkipExpression expression)
        {
            Check.NotNull(expression, "expression");

            DbExpression result = expression;

            var newInput     = VisitExpressionBindingEnterScope(expression.Input);
            var newSortOrder = VisitSortOrder(expression.SortOrder);

            ExitScope();
            var newCount = VisitExpression(expression.Count);

            if (!ReferenceEquals(expression.Input, newInput)
                ||
                !ReferenceEquals(expression.SortOrder, newSortOrder)
                ||
                !ReferenceEquals(expression.Count, newCount))
            {
                result = CqtBuilder.Skip(newInput, newSortOrder, newCount);
            }
            NotifyIfChanged(expression, result);
            return(result);
        }