Skip to main content
Removed link to user's blog as it didn't have anything to do with the answer.
Source Link
sepp2k
  • 9k
  • 2
  • 38
  • 51

You could take your original approach and use .ToList()

var invoicesGroupdByCustomers = invoices.GroupBy(x => x.CustomerId).ToList();
var ordersGroupdByCustomers = orders.GroupBy(x => x.CustomerId).ToList();
var paymentsGroupdByCustomers = payments.GroupBy(x => x.CustomerId).ToList();

Just another option to be aware of. I hope this helps.

Check out my blog for tutorials http://www.refactorthis.net

You could take your original approach and use .ToList()

var invoicesGroupdByCustomers = invoices.GroupBy(x => x.CustomerId).ToList();
var ordersGroupdByCustomers = orders.GroupBy(x => x.CustomerId).ToList();
var paymentsGroupdByCustomers = payments.GroupBy(x => x.CustomerId).ToList();

Just another option to be aware of. I hope this helps.

Check out my blog for tutorials http://www.refactorthis.net

You could take your original approach and use .ToList()

var invoicesGroupdByCustomers = invoices.GroupBy(x => x.CustomerId).ToList();
var ordersGroupdByCustomers = orders.GroupBy(x => x.CustomerId).ToList();
var paymentsGroupdByCustomers = payments.GroupBy(x => x.CustomerId).ToList();

Just another option to be aware of. I hope this helps.

Source Link

You could take your original approach and use .ToList()

var invoicesGroupdByCustomers = invoices.GroupBy(x => x.CustomerId).ToList();
var ordersGroupdByCustomers = orders.GroupBy(x => x.CustomerId).ToList();
var paymentsGroupdByCustomers = payments.GroupBy(x => x.CustomerId).ToList();

Just another option to be aware of. I hope this helps.

Check out my blog for tutorials http://www.refactorthis.net