Exemple #1
0
        protected override Expression VisitIn(InExpression inExpression)
        {
            Visit(inExpression.Item);
            _sqlBuilder.Append(inExpression.Negated ? " NOT IN " : " IN ");
            _sqlBuilder.Append("(");
            var valuesConstant = (SqlConstantExpression)inExpression.Values;
            var valuesList     = ((IEnumerable <object>)valuesConstant.Value)
                                 .Select(v => new SqlConstantExpression(Expression.Constant(v), valuesConstant.TypeMapping)).ToList();

            GenerateList(valuesList, e => Visit(e));
            _sqlBuilder.Append(")");

            return(inExpression);
        }
 protected abstract Expression VisitIn(InExpression inExpression);