c# - Entity Framework Batch Update by ID -


I am using an entity framework project whereby id needs to record the batch update. The primary key is available at runtime, and I would like to update all records like the following records:

  EntityTable update column = @ p0 The problem running in EntityID I am I have about 60k IDs (worst) to handle me And our database software (SQL Server 2008) can not handle it:  

The query processor was out of internal resources and could not prepare a query plan. This is a rare event and only a lot Expected for complex questions or questions, which refers to large tables or divisions. Please simplify the query If you believe that you received this message in error, please contact customer support services for more information.

Through Google searches I've found that old-school DataTable and SqlDataAdapter call for it to complete, but If possible I would like to be within the spirit of the unit framework, or if necessary, raw SQL. Is there any way to do this in a proper way?

EF does not support batch updates directly, so you have to use direct SQL to be your best choice The table contains valuable parameters that contain your ID. EF does not support the valuable standards of the table, and this causes you to directly adro Use the net.

Your current solution can improve only by splitting your ID into smaller groups and by performing your updates for each individual subtitle.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -