Example #1
0
        private Expression VisitMethodAll(MethodCallExpression node)
        {
            if (node.Method.DeclaringType == typeof(Queryable))
            {
                VisitExists(node);

                SQLWriter.WriteAnd();

                return(WrapNot(() =>
                {
                    _fromSwitch.UnWrap(() => _whereSwitch.UnWrap(() => _orderBySwitch.UnWrap(() =>
                    {
                        VisitExists(node, true);
                    })));

                    return node;
                }));
            }
            throw new ExpressionNotSupportedException($"仅支持“System.Linq.Queryable”中的{node.Method.Name}函数!");
        }