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
This worked best.
(from p in Context.person_account_portfolio where p.person_id == personId select p).ToList() .ForEach(x => x.is_default = false); Context.SaveChanges();