Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie to Linq
Message
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01605340
Message ID:
01605478
Vues:
38
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform