Converting a SQL query with group by into LINQ query?

I don't have time for a full answer now, but: To get at properties of the key, use newInv.Key. StrReference etc To get at aggregates (e.g. Max values) use newInv. Max(x => x.

ProjectId) etc Hopefully that'll be enough to get you going. Basically newInv will be a group of entries, with an associated key (which is what you grouped by).

I don't have time for a full answer now, but: To get at properties of the key, use newInv.Key. StrReference etc To get at aggregates (e.g. Max values) use newInv. Max(x => x.

ProjectId) etc Hopefully that'll be enough to get you going. Basically, newInv will be a group of entries, with an associated key (which is what you grouped by).

Thanks for that Jon I had a bit of a brain freeze yesterday. – DazManCat Sep 17 '10 at 9:13 Of course the other option is to do a simple LINQ query then do a invoices. GroupBy(x => new { x.

InvoiceID, x. InvoiceDate, x. Reference, x.

TotalValue }); – DazManCat Sep 17 '10 at 9:24.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions