Entity Framework bulk insert with transaction management - Performance

c# entity-framework-6

Question

I used the advice given in the aforementioned site to improve the efficiency of the entity framework for bulk updates and inserts.

Performance optimization for bulk inserts in Entity Framework

  1. modifications were saved in a batch of 1000.
  2. the rejuvenation ofDbContext object changes after each save

I experienced the predicted performance gain.

However, I must roll back the transaction when an exception condition is met while carrying out a bulk insert.

When we re initialise the system, this problem arises.DbContext object.

If the exception condition applies, is there any method to utilise the transaction and rollback with the same setup?

I would appreciate any assistance.

1
0
2/8/2018 6:42:00 AM

Expert Answer

ZZZ_tmp
0
2/22/2018 12:39:01 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow