Exemple #1
0
 public Queryable <ModelType> OrNot <PropertyType>(Expression <Func <ModelType, PropertyType> > selector, QueryOperationEnum operation, PropertyType value)
 {
     AppendCondition(GetFieldName(selector), operation, value);
     AppendLogicOperation("OrNot");
     return(this);
 }
Exemple #2
0
 private static void AppendCondition <PropertyType>(SearchQuery searchModel, string fieldName, QueryOperationEnum operation, PropertyType value)
 {
     searchModel.Query.Add(new ConditionEntity {
         Index = searchModel.Query.Count, FieldName = fieldName, Operation = operation, Value = value.ToString()
     });
 }
Exemple #3
0
        public static Queryable <ModelType> For <PropertyType>(Expression <Func <ModelType, PropertyType> > selector, QueryOperationEnum operation, PropertyType value)
        {
            var search = new SearchQuery()
            {
                Expression = "Q0"
            };

            AppendCondition(search, GetFieldName(selector), operation, value.ToString());
            return(new Queryable <ModelType>(search));
        }