0

I fetch a list of rows (Id,field1,f2...) and do some computation and store the result in a IList. I want to now update all the values in this list to a table T. I am using entity framework and this needs to be a transaction.

Will it be fine if I open a transactionscope and update using a stored proc or is thr a efficient way to push multiple updates once ?

user1701550
  • 23
  • 1
  • 6

1 Answers1

0

SaveChanges method of ObjectContext is a gateway to persist all changes made to entities to the database. When you call ObjectContext.SaveChanges(), it performs insert, update or delete operation on the database based on EntityState of the entities.

ObjectContext.SaveChanges();

Hope this may help you.

Krish
  • 376
  • 1
  • 10