Пример #1
0
        protected override Expression VisitConstant(ConstantExpression node)
        {
            if (TypeSystem.IsTypeAssignable(node.Value.GetType(), typeof(DbQueryable <>)))
            {
                sqlQueryBuilder.AddSelect(TypeSystem.GetElementType(node.Value.GetType()), null);
            }
            else
            {
                sqlQueryBuilder.AddConstant(node.Value);
            }

            return(base.VisitConstant(node));
        }