Reputation: 7574
How to write an update query in EntityFramework using LINQ to Entities?
EDIT: And if it is possible how this query can be written in Entity SQL?
Upvotes: 2
Views: 1227
Reputation: 126547
Neither LINQ to Entities (nor LINQ to anything else) nor ESQL support updates.
Upvotes: 2
Reputation: 65371
There are 2 aternatives:
Upvotes: 5
Reputation: 1324
LINQ does not support update operation. All you can do is fetch entity from database, change it's properties and submit changes back into database.
Upvotes: 3