Walaa was referring to the fact that you can't fetch an entity collection with an aggregate. So you have to use different ways to get the aggregated value if you already have the collection / want to use the collection, e.g. manually traverse the list. A typed list is one way to get the value, you can also look into a scalar query or a dynamic list.