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();
More Related Contents:
- Linq: help me to make this work
- Dynamic where clause (OR) in Linq to Entities
- How do I apply OrderBy on an IQueryable using a string column name within a generic extension method?
- Bulk-deleting in LINQ to Entities
- Writing Recursive CTE using Entity Framework Fluent syntax or Inline syntax
- The type of one of the expressions in the join clause is incorrect in Entity Framework
- Entity framework left join
- Why doesn’t Include have any effect?
- Value cannot be null. Parameter name: source
- Recursive Hierarchy – Recursive Query using Linq
- Filter/Search using Multiple Fields – ASP.NET MVC
- Linq to EntityFramework DateTime
- LINQ to SQL multiple tables left outer join
- How to Bulk Update records in Entity Framework?
- The result of a query cannot be enumerated more than once
- Entity Framework. Delete all rows in table
- “The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities” – stumped!
- Entity-framework code is slow when using Include() many times
- LINQ, Unable to create a constant value of type XXX. Only primitive types or enumeration types are supported in this context
- The operation cannot be completed because the DbContext has been disposed using MVC 4
- Linq to Entity Join table with multiple OR conditions
- Export Model to DataTable
- ‘Date’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- Simulating Cross Context Joins–LINQ/C#
- Max return value if empty query
- Check if list contains item from other list in EntityFramework
- How to do an “in” query in entity framework?
- Keep Getting ‘The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities’ Exception
- Should the order of LINQ query clauses affect Entity Framework performance?
- How to wrap Entity Framework to intercept the LINQ expression just before execution?