I have code similar to this:

```
decimal total1 = 0;
decimal poTotal = 0;
foreach( var record in listOfRecords)
{
   total1 += record.Price;
   if ( record.HasPo){
     poTotal += record.PoTotal;
   }
 }

```

This works fine but I'd like to know how to perform multiple aggregates using linq without excessive coding for groups etc... is there a simple way that doesn't require scanning the list of objects each time?

I know I could do this:

```
var poTotal = listOfRecords.Where(r=> r.HasPo).Sum(r.PoTotal);

```

But that requires scanning the entire list and I if I'm to aggregate multiple values I only want to loop/scan one time.