Ejemplo n.º 1
0
        protected virtual Expression VisitSubquery(SubqueryExpression subquery)
        {
            switch ((DbExpressionType)subquery.NodeType)
            {
            case DbExpressionType.Scalar:
                return(this.VisitScalar((ScalarExpression)subquery));

            case DbExpressionType.Exists:
                return(this.VisitExists((ExistsExpression)subquery));

            case DbExpressionType.In:
                return(this.VisitIn((InExpression)subquery));
            }
            return(subquery);
        }
Ejemplo n.º 2
0
        protected virtual bool CompareSubquery(SubqueryExpression a, SubqueryExpression b)
        {
            if (a.NodeType != b.NodeType)
            {
                return(false);
            }
            switch ((DbExpressionType)a.NodeType)
            {
            case DbExpressionType.Scalar:
                return(CompareScalar((ScalarExpression)a, (ScalarExpression)b));

            case DbExpressionType.Exists:
                return(CompareExists((ExistsExpression)a, (ExistsExpression)b));

            case DbExpressionType.In:
                return(CompareIn((InExpression)a, (InExpression)b));
            }
            return(false);
        }