Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie to Linq
Message
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01605340
Message ID:
01605478
Views:
37
Just to update you Viv your anonymous type code worked perfectly as well - thanks again.

Edit

This is what I've settled on
var results = Context.invoices.Where(x => x.invoiceamount >= InvoiceAmount).GroupBy(x => x.client)
                .Select(group => new { companyname = group.Key.companyname,Id = group.Key.id, invoices = group.OrderByDescending(x => x.invoiceamount) })
             .OrderByDescending(group => group.invoices.Sum(x => x.invoiceamount)).ToList();
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform