I am using the Adapter, and wish to do a simple Sum Aggreate on an in memory Enitity Collection. I have searched the documentation and forum, and it seems like AggregateSetPredicate is what i should be using, but I cannot get it to work and am a little confused by it's usage. I do not need to qualify what rows to sum, I just wish to get the sum of a few of the fields contained in the collection. I am constrained to .NET 2.0, so I cannot use Linq.
Here is the line of code that I have:
IPredicate sumFilter = new AggregateSetPredicate("AwipTotalCostsToDate", AggregateSetFunction.Sum, FcsVwAcctWipNoBidFields.AwipId, ComparisonOperator.GreaterEqual ,0, null);
I get the error that AwipTotalCostsToDate isn't found, though it is definately a field on the entity (when I tried to use the MemberNames like in the documentation, intellisense shows nothing, so again confused). Also, I don't really understand what the 'Value Producer' field is for, I just put the ID field in there becuase that seemed to be what was in the example. I also don't really need the 'Greater Than or Equal' operator, but seemed forced to include it.
Thanks!
Danny