コード例 #1
0
        public Expression Build(Expression parentMember, Expression constant, bool useCaseInsensitiveComparison)
        {
            if (parentMember.Type == typeof(string) && useCaseInsensitiveComparison)
            {
                parentMember = StrategyUtils.ToLowerIfCaseInsensitive(parentMember, useCaseInsensitiveComparison);
                constant     = StrategyUtils.ToLowerIfCaseInsensitive(constant, useCaseInsensitiveComparison);
            }

            return(_strategy.Build(parentMember, constant));
        }
コード例 #2
0
        public Expression Build(Expression parentMember, Expression constant)
        {
            if (parentMember.Type.IsEnum)
            {
                return(StrategyUtils.CompareEnums(FilterOperation.GreaterThanOrEqual, parentMember, constant));
            }
            else if (parentMember.Type == typeof(string))
            {
                return(StrategyUtils.CompareStrings(FilterOperation.GreaterThanOrEqual, parentMember, constant));
            }

            return(Expression.GreaterThanOrEqual(parentMember, constant));
        }