I need to set a value in a table for a subset of rows. In SQL, I would do this:
UPDATE dbo.Person SET is_default = 0 WHERE person_id = 5
Is
Strangely, for me it's SubmitChanges as opposed to SaveChanges:
foreach (var item in w) { if (Convert.ToInt32(e.CommandArgument) == item.ID) { item.Sort = 1; } else { item.Sort = null; } db.SubmitChanges(); }