How to Bulk Update records in Entity Framework?

前端 未结 7 2089
遥遥无期
遥遥无期 2020-12-01 08:00

I am trying to bulk update records using Entity Framework. I have tried Entity Framework.Extensions Update method.

The Update method is abl

相关标签:
7条回答
  • 2020-12-01 08:48

    In EF 6 we have AddRange method in each table. Documents suggest this method is much faster than using many add methods. So, one can insert all updatable records in a temp table and batch update main table using a single sql statement.

    EDIT: This Document suggests that AddRange only optimizes change detection. It does not change how the changes are applied to the database.

    0 讨论(0)
提交回复
热议问题