Exemple #1
0
        private static ExpressionStarter <ResCurrentType> CollectionNotEqualToPredicate(ResourceSearch <ResCurrentType, ResIndexStringType, ResIndexTokenType, ResIndexUriType, ResIndexReferenceType, ResIndexQuantityType, ResIndexDateTimeType> Search, ExpressionStarter <ResCurrentType> NewPredicate, SearchParameterQuantity SearchTypeNumber, SearchParameterQuantityValue SearchValue)
        {
            var NotEqualTo_Expression = Search.QuantityCollectionAllNotEqualTo(
                SearchTypeNumber.Id,
                Common.Tools.DecimalSupport.CalculateLowNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.Value,
                Common.Tools.DecimalSupport.CalculateHighNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.System,
                SearchValue.Code);

            var CollectionNotNull_Expression2 = Search.SearchParameterIdIsNotNull <ResIndexQuantityType>(SearchTypeNumber.Id);

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

            NewAndPredicate = NewAndPredicate.And(NotEqualTo_Expression);
            NewAndPredicate = NewAndPredicate.And(CollectionNotNull_Expression2);

            NewPredicate = NewPredicate.Or(NewAndPredicate);
            return(NewPredicate);
        }
Exemple #2
0
        private static ExpressionStarter <IResourceIndexed> CollectionNotEqualToPredicate(Search <IResourceIndexed> Search, ExpressionStarter <IResourceIndexed> NewPredicate, SearchParameterQuantity SearchTypeNumber, SearchParameterQuantityValue SearchValue)
        {
            var NotEqualTo_Expression = Search.QuantityCollectionAllNotEqualTo(
                SearchTypeNumber.Id,
                Common.Tools.DecimalSupport.CalculateLowNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.Value,
                Common.Tools.DecimalSupport.CalculateHighNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.System,
                SearchValue.Code);

            var CollectionNotNull_Expression2 = Search.SearchParameterIdIsNotNull <Index.IQuantityIndex>(SearchTypeNumber.Id);

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

            NewAndPredicate = NewAndPredicate.And(NotEqualTo_Expression);
            NewAndPredicate = NewAndPredicate.And(CollectionNotNull_Expression2);

            NewPredicate = NewPredicate.Or(NewAndPredicate);
            return(NewPredicate);
        }
Exemple #3
0
        private static ExpressionStarter <ResCurrentType> CollectionEqualToPredicate(ResourceSearch <ResCurrentType, ResIndexStringType, ResIndexTokenType, ResIndexUriType, ResIndexReferenceType, ResIndexQuantityType, ResIndexDateTimeType> Search, ExpressionStarter <ResCurrentType> NewPredicate, SearchParameterQuantity SearchTypeNumber, SearchParameterQuantityValue SearchValue)
        {
            var Expression = Search.QuantityCollectionAnyEqualTo(
                SearchTypeNumber.Id,
                Common.Tools.DecimalSupport.CalculateLowNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.Value,
                Common.Tools.DecimalSupport.CalculateHighNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.System,
                SearchValue.Code);

            NewPredicate = NewPredicate.Or(Expression);
            return(NewPredicate);
        }
Exemple #4
0
        private static ExpressionStarter <IResourceIndexed> CollectionEqualToPredicate(Search <IResourceIndexed> Search, ExpressionStarter <IResourceIndexed> NewPredicate, SearchParameterQuantity SearchTypeNumber, SearchParameterQuantityValue SearchValue)
        {
            var Expression = Search.QuantityCollectionAnyEqualTo(
                SearchTypeNumber.Id,
                Common.Tools.DecimalSupport.CalculateLowNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.Value,
                Common.Tools.DecimalSupport.CalculateHighNumber(SearchValue.Value, SearchValue.Scale),
                SearchValue.System,
                SearchValue.Code);

            NewPredicate = NewPredicate.Or(Expression);
            return(NewPredicate);
        }