Inject property into existing List with LINQ -


i have generic list of objects. objects have 4 properties. 3 set linq earlier in app. possible insert 4th property existing list using linq sql without looping through each object in list?

edit
reference sake, 1 of first properties id on record, know each object in list 4th property should in database, hoping without loop list might rather huge.

i'm not sure 100% understand, in linq query this:

var result = r in repository              select new mytype()              {                  value1 = r.value1,                  value2 = r.value2,                  value3 = r.value3,                  value4 = "myvalue",              } 

untested, general idea should work.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -