3
Answers

Help with OrderBy LINQ to SQL

Ask a question
Hi,

Please could you tell me how i would be able to order by AmountOutstanding, i've tried everything and just cant seem to get it right.

EbillzDataContext




ebillzDataContext = new EbillzDataContext();
var allInvoices = from inv in ebillzDataContext.Invoicesgroup inv by inv.CustomerCode into g
select new{CustomerCode = g.Key, AmountOutstanding = g.Sum(cust => cust.AmountOutstanding)

} ;


gridControl1.DataSource = allInvoices;

gridView1.PopulateColumns();


Thanks In Advance

Anthony


Answers (3)