Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="subquery"></param>
        /// <returns></returns>
        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
        /// <summary>
        ///
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        /// <returns></returns>
        protected virtual bool CompareSubquery(SubqueryExpression a, SubqueryExpression b)
        {
            if (a.NodeType != b.NodeType)
            {
                return(false);
            }
            switch ((DbExpressionType)a.NodeType)
            {
            case DbExpressionType.Scalar:
                return(this.CompareScalar((ScalarExpression)a, (ScalarExpression)b));

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

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