UPDATE M_User
SET id=string1,code=string2,name=string3
WHERE code=certain_str;
can anyone give me the simple LINQ version of this. I tried looking for other post all I see are the ones I cant understand.
UPDATE M_User
SET id=string1,code=string2,name=string3
WHERE code=certain_str;
can anyone give me the simple LINQ version of this. I tried looking for other post all I see are the ones I cant understand.
this might help you.
var result =
(from c in db.M_User
where c.Code == certain_Str
select c).First();
// Change the id, code, name
result.id = string1;
result.code = string2;
result.name = string3;
// Ask the DataContext to save all the changes.
db.SubmitChanges();