Hi all.
Im using Linq - objects and I need to do an update. I've been looked around for a while but not really found anything that matches.
So for arguments sake I have 2 simple List's, both with a key so I can use join happily.
I cant find a simple way to update results from obj2 into obj1.
for simple updates I'm currently doing this:
string newValue = "something";
var items = obj1.Where(w => w.ID == iKey).Select(c => {c.<property> = newValue; return c; }).ToArray();
And that all works well and dandy. However if I add into the mix my second table and I want to replace newValue with obj2. then I get problems.
Primarily because I then switch to a full linq statement like:
var UPDATE = from o1 in obj1
join o2 in obj2 on o1.key equals o2.key
select ....;
Its here im getting stuck.
If anybody could help I would be extremly grateful! Thanks in advance.