I found many examples of custom aggregates and I'm able to do aggregate function with those helps for specific class with specific property which is used in my grid. But now I have few situations that I want to get count of checked (in class type boolean with value true) from that column. I would like to get it done in one function so I don't need to do several almost same kind code (only class and property changed).
So how I have to change this function to get it work universally (without class 'DeliveriesForAccountsCls' and property name 'isChecked')?
CheckedDeliveriesCount : AggregateFunction<DeliveriesForAccountsCls,
.AggregationExpression = items => Summary(items);
var itemCount = source.Count();
(itemCount > 1)
var values = source.Where(x => x.isChecked);
var sum = values.Count();