When would one use DelegateFilterBuilder instead of FilterExpression (and vice versa)? E.g. I can achieve same (sort of) functionality with:
public static FilterExpression In(this ContentReference value, IEnumerable values)
{
var ids = values.Select(x => x.ID);
return new FilterExpression(x => x.ID.In(ids));
}
and:
public static DelegateFilterBuilder In(this ContentReference value, IEnumerable values)
{
var ids = values.Select(x => x.ID);
var fieldFilterValues = ids.Select(FieldFilterValue.Create);
return new DelegateFilterBuilder(field => new TermsFilter(field + ".ID$$number", fieldFilterValues));
}
Another question regarding my last code snippet, is there a way to express the ID property of a ContentReference without the ugly string concatenation?
Hi,
When would one use DelegateFilterBuilder instead of FilterExpression (and vice versa)? E.g. I can achieve same (sort of) functionality with:
and:
Another question regarding my last code snippet, is there a way to express the ID property of a ContentReference without the ugly string concatenation?