Hey Frans & others!
For starters, thanks for a great development tool!
Ok, I am trying to filter an entitycollection in memory. I do not want these predicates to be case sensitive.
I was trying to this implement using "native language constructs."
Dim filter As IPredicateExpression = ((LiveBlocksFields.StrProductId = lb.StrProductId.ToUpper) And _
(LiveBlocksFields.Ready = lb.Ready.ToUpper) And (LiveBlocksFields.StrWarehouseId = lb.StrWarehouseId.ToUpper))
The above strategy was not allowing me to specify the CaseSensitiveCollation property of the FieldCompareValuePredicate.
After reading the manual more , I have code that performs the filter NON Case-sensistive, but not as efficiently:
filter = New PredicateExpression
Dim ProdID As New FieldCompareValuePredicate
ProdID = (PredicateFactory.CompareValue(LiveBlocksFieldIndex.ProductId, ComparisonOperator.Equal, lb.StrProductId.ToUpper))
ProdID.CaseSensitiveCollation = True
Dim ready As New FieldCompareValuePredicate
ready = (PredicateFactory.CompareValue(LiveBlocksFieldIndex.Ready, ComparisonOperator.Equal, lb.Ready.ToUpper))
ready.CaseSensitiveCollation = True
Dim Warehouse As New FieldCompareValuePredicate
Warehouse = (PredicateFactory.CompareValue(LiveBlocksFieldIndex.WarehouseId, ComparisonOperator.Equal, lb.StrWarehouseId.ToUpper))
Warehouse.CaseSensitiveCollation = True
filter.Add(ProdID)
filter.AddWithAnd(ready)
filter.AddWithAnd(Warehouse)
Is there are better way than what I have settled for?