예제 #1
0
        protected override Expression VisitMember(MemberExpression node)
        {
            if (node.Expression is ParameterExpression)
            {
                var member = ExpressionVistorHelper.VisitMember(node);

                whereModel.Prefix = member.Prefix;
                whereModel.Sql.Append(member.Express);
            }
            else
            {
                var value = Expression.Lambda(node).Compile().DynamicInvoke();
                AddConstant(value);
                return(Expression.Constant(value));
            }


            //Result.Prefix = member.Prefix;
            //Result.Sql.Append(member.WhereExpression);
            //Sql.Append(node);

            //model.Sql.Append(node);


            return(base.VisitMember(node));
        }
예제 #2
0
        protected override MemberAssignment VisitMemberAssignment(MemberAssignment node)
        {
            var field = ExpressionVistorHelper.VisitMember(node.Member);

            UpdatedFields.Add(field);

            return(node);
        }
예제 #3
0
        protected override Expression VisitMember(MemberExpression node)
        {
            var member = ExpressionVistorHelper.VisitMember(node);

            UpdatedFields.Add(member);


            return(node);
        }
예제 #4
0
        protected override Expression VisitNew(NewExpression node)
        {
            foreach (var nodeArgument in node.Arguments)
            {
                var member = ExpressionVistorHelper.VisitMember((nodeArgument as MemberExpression));

                UpdatedFields.Add(member);
            }

            return(node);
        }
예제 #5
0
        protected override Expression VisitNew(NewExpression node)
        {
            if (node.Members == null)
            {
                return(base.VisitNew(node));
            }

            foreach (var nodeMember in node.Members)
            {
                var field = ExpressionVistorHelper.VisitMember(nodeMember);

                UpdatedFields.Add(field);
            }

            return(node);
        }