Quote:
|
if I am not wrong then won't it hit database multiple times?
|
Yes, but in the end you need to do that anyway as you can't update multiple, unrelated rows. The suggestion from irProject with a WHERE clause is the only way really.
EF lets you update multiple rows. You query the objects you want to change, set properties on them and then update the changes.
Try a Google search for
asp.net update multiple rows. You'll find lots of useful examples.
Cheers,
Imar