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
Post a Comment