コード例 #1
0
 /// <summary>
 /// Adds a Set clause to the query.  Used only for UPDATE operations.
 /// </summary>
 /// <returns>
 /// UpdateValuesBuilder of TPropEnum, TQuery, TQueryBuilder
 /// </returns>
 public UpdateValuesBuilder <TPropEnum, TQuery, TQueryBuilder> Set(TPropEnum prop, object val)
 {
     if (SetValues == null)
     {
         SetValues = new QueryFilters <TPropEnum>();
     }
     SetValues.Add(QueryFilter.New(prop, FilterConditions.Equals, val));
     return(this);
 }
コード例 #2
0
        private void AddCondition(FilterOperators filterOperator, TPropEnum prop, FilterConditions condition, object val)
        {
            if (PredicateFilters == null)
            {
                PredicateFilters = new QueryFilters <TPropEnum>();
            }
            if (CurrentExpression == null)
            {
                PredicateFilters.Add(QueryFilter.New(prop, condition, filterOperator, val));
                return;
            }
            var filter = QueryFilter.New(prop, condition, CurrentExpression.Operator, val);

            filter.StartExpressions = CurrentExpression.OpenExpressions;
            PredicateFilters.Add(filter);
            CurrentExpression = null;
        }