GurdeepS
GurdeepS

Reputation: 67223

Can EF4 support batch updates?

Does Entity Framework v4 support batch updates/inserts so rather than sending >1 command to a db, it can send >1 command to the DB in one go?

Thanks

Upvotes: 13

Views: 5753

Answers (3)

dugbugs
dugbugs

Reputation: 36

I discovered a good answer to this question here: Paul Welter shows how to use EntityFramework.Extended

Upvotes: 1

John Egbert
John Egbert

Reputation: 5776

I believe that can be accomplished by adding multiple Entity to the context and calling save changes.

context.ApplyChanges<T>("Order", obj1);
context.ApplyChanges<T>("Order", obj2);
context.SaveChanges();

Upvotes: 0

Tim Hoolihan
Tim Hoolihan

Reputation: 12396

I don't believe that has changed. You have the options of:

Upvotes: 10

Related Questions