Exemplo n.º 1
0
        private static ExpressionStarter <ResCurrentType> CollectionNotEqualToPredicate(ResourceSearchExpressionTrees <ResCurrentType, ResIndexStringType, ResIndexTokenType, ResIndexUriType, ResIndexReferenceType, ResIndexQuantityType, ResIndexDateTimeType> Search, ExpressionStarter <ResCurrentType> NewPredicate, SearchParameterNumber SearchTypeNumber, SearchParameterNumberValue SearchValue)
        {
            var NotEqualToExpression         = Search.NumberCollectionAllNotEqualTo(SearchTypeNumber.Id, Common.Tools.DecimalSupport.CalculateLowNumber(SearchValue.Value, SearchValue.Scale), SearchValue.Value, Common.Tools.DecimalSupport.CalculateHighNumber(SearchValue.Value, SearchValue.Scale));
            var CollectionNotNull_Expression = Search.SearchParameterIdIsNotNull <ResIndexQuantityType>(SearchTypeNumber.Id);

            ExpressionStarter <ResCurrentType> NewAndPredicate = LinqKit.PredicateBuilder.New <ResCurrentType>();

            NewAndPredicate = NewAndPredicate.And(NotEqualToExpression);
            NewAndPredicate = NewAndPredicate.And(CollectionNotNull_Expression);

            NewPredicate = NewPredicate.Or(NewAndPredicate);

            return(NewPredicate);
        }