示例#1
0
        private static QueryProperty Add <T>(QueryProperty property, string operatorName, params T[] operands)
        {
            var expression = string.Format("[{0}]",
                                           string.Join(",", operands.Select(QueryOperator.ConvertOperandToJson)));

            property.AddOperator(new QueryOperator(operatorName, expression));

            return(property);
        }
示例#2
0
        public static QueryProperty HasAll <T>(this QueryProperty property, params T[] values)
        {
            var expression = string.Format("[{0}]",
                                           string.Join(",", values.Select(QueryOperator.ConvertOperandToJson <T>)));

            property.AddOperator(new QueryOperator("$all", expression));

            return(property);
        }