Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mapping collections with LINQ

I have a collection of objects to which I'd like to just add a new property. How do I do that with LINQ?

like image 693
Esteban Araya Avatar asked Nov 06 '22 23:11

Esteban Araya


1 Answers

var a = from i in ObjectCollection select new {i.prop1, i.prop2, i.prop3, ..., newprop = newProperty}
like image 55
John Boker Avatar answered Nov 15 '22 09:11

John Boker