4

Can anyone suggest me how to deal with batch updates using Entity Framework?

For ex: Updating a field for a list (List) of between 100 and 1000 Id's, which the primary key. Calling each update separately seem to be to much overhead and takes a long time.

1 Answer 1

1

Until you call SaveChanges() none of the data is updated in the database so you can make how many changes you'd like.

You can take a look at a Unit of Work design pattern if you want a more structured way of saving changes to the database.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for reply..But Adrian did you get my point? i know that until i call SaveChanges() nothing is updated to database. what i need all about batch update.
Hi, you can check this thread out stackoverflow.com/questions/12751258/batch-update-delete-ef5 hope it answers some of your questions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.