rtbike wrote:
could you point me to an example of a normal compare predicate?
can I just say:
IPredicateExpression filterSeries = new PredicateExpression();
filterSeries.Add(SeasonFields.BookingDeadline >= myDate)
filterSeries.AddWithAnd(SeasonFields.BookingDeadline <= myDate)
That's it
rtbike wrote:
if the above works is there an advantage to you the special pedicates over this?
There're some predicates that are shortcuts, for example:
To achieve this SQL:
Field IN (1, 2, 5, 10)
Field IN ("Foo", "Bar", "Blah")
You can do this:
int[] values = new int[3] {1, 2, 5};
filter.Add(new FieldCompareRangePredicate(OrderFields.EmployeeId, values));
// which is equal to:
filter.Add(OrderFields.EmployeeId == values);
Instead of writing 3 normal predicates.
In brief, you can do a lot of thing with predicates, and expression.
I recommend to you read this topics:
- The predicate system
- Advance filter usage
- Expressions and aggregates
Those links are a good start to build whatever you want on LLBLGenPro (well, at least a bunch of things
then you could keep reading)