Can any ORM perform bulk operations, like bulk insert, update or merge out of the box?

I have a problem with my app, that uses EF6, when I try to update values of 100+ objects. Even when I do all the disable tracking thing / use addRange it takes a significant amount of time to push all those objects to SQL Server 1 by 1.

I discovered some implementations of extension libraries, using SQLBulkCopy or Temp tables under the hood. I am familiar with those techniques and actually planing to replace EF with sproc with table valued parameter. But it adds a bit of work, related to creating and maintaining those TVP, as they are not modifiable.

Question is – can any ORM do it by default. And if not – why don’t they bother with implementing those things? There are definitely several ways to do this without changing a DB schema.

submitted by /u/Grasher134
[link] [comments]

Leave a Reply