protected override Expression VisitUnary(UnaryExpression node) { switch (node.NodeType) { case ExpressionType.Not: if (node.Operand is SubQueryExpression) { var nested = new WhereClauseVisitor(_parent, _mapping); nested.Visit(node.Operand); var @where = new NotWhereFragment(nested.ToWhereFragment()); _register.Peek()(@where); } else { var visitor = new NotVisitor(this, _mapping, _register.Peek(), _parent._serializer); visitor.Visit(node); } return(null); } return(base.VisitUnary(node)); }
protected override Expression VisitUnary(UnaryExpression node) { switch (node.NodeType) { case ExpressionType.Not: if (node.Operand is SubQueryExpression) { var nested = new WhereClauseVisitor(_parent, _mapping); nested.Visit(node.Operand); var @where = new NotWhereFragment(nested.ToWhereFragment()); _register.Peek()(@where); } else { var visitor = new NotVisitor(this, _mapping, _register.Peek()); visitor.Visit(node); } return null; } return base.VisitUnary(node); }