I can update one row by:
db.table.First().Salary = 99999;
But, how can I update some rows without foreach, for, or while loop?
Thanks for your help.
How to Update/delete some rows?
LINQ to Entities is used only the SELECT queries (no DML support). So it is necessary to read all records on the client's side (foreach, for, or while loop), modify, and write to database. Usually this task can be done faster using native SQL (not EF).
If you have to use Entity Framework, please try Batch Updates (http://www.devart.com/blogs/dotconnect/ ... html#Batch).
If you have to use Entity Framework, please try Batch Updates (http://www.devart.com/blogs/dotconnect/ ... html#Batch).