Batching DB commands in Entity Framework 4.0

No, it can’t be done (yes – i weep also).

EF does not support batch operations, LINQ-SQL had (has) the same problem.

You’ve got a few options:

  1. Stored Procedures
  2. Classic ADO.NET or EntitySQL
  3. Triggers

I’ve gone with option 1 and 3 in the past.

The problem with all three approaches is you lose the EF abstraction, the internal graph (optimistic concurrency), and your brought back to the world of native SQL.

Leave a Comment