Пример #1
0
 /// <summary>
 /// 访问 <see cref="SubqueryExpression"/>。
 /// </summary>
 /// <param name="subquery">要访问的表达式。</param>
 /// <returns></returns>
 protected virtual Expression VisitSubquery(SubqueryExpression subquery)
 {
     return(((DbExpressionType)subquery.NodeType) switch
     {
         DbExpressionType.Scalar => VisitScalar((ScalarExpression)subquery),
         DbExpressionType.Exists => VisitExists((ExistsExpression)subquery),
         DbExpressionType.In => VisitIn((InExpression)subquery),
         _ => subquery,
     });
Пример #2
0
        /// <summary>
        /// 访问 <see cref="SubqueryExpression"/>。
        /// </summary>
        /// <param name="subquery">要访问的表达式。</param>
        /// <returns></returns>
        protected virtual Expression VisitSubquery(SubqueryExpression subquery)
        {
            switch (subquery.NodeType)
            {
            case DbExpressionType.Scalar:
                return(VisitScalar((ScalarExpression)subquery));

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

            case DbExpressionType.In:
                return(VisitIn((InExpression)subquery));
            }
            return(subquery);
        }