Example #1
0
        private static BinaryExpression CallCondition(ExpressionType operand, Tuple <Type, string> value, KeyPropertyContainer container)
        {
            var expr     = container.Property.GenerateGetProperty(container.Parameter);
            var tmpValue = AffectorUtility.CreateValueExpression(expr.Type, value);

            return(Expression.MakeBinary(operand, expr, tmpValue));
        }
Example #2
0
        private static Expression CallSetValue(ExpressionType operand, Tuple <Type, string> value, ValuePropertyContainer container)
        {
            var infos = container.Properties.Select(prop => new ValueOperatorInfo
            {
                ExpressionType = operand,
                PropertyName   = prop.PropertyInfo.Name,
                Value          = AffectorUtility.CreateValueExpression(prop.PropertyInfo.PropertyType, value),
            }).ToArray();

            return(container.EntityInfo.IfThenSection(container.Parameter, container.NewParameter, infos));
        }