Entity Framework executesqlcommand in same transaction as savechanges

entity-framework entity-framework-6

Question

My issue is that I need to delete and re-insert 15000 rows in order to update them. This must take place in only one transaction. Row by row removal is really slow when I do it. Insertion went smoothly.

Is it possible to run an ExecuteSqlCommand statement in the same transaction as the insert statements that save changes to the context?

1
6
9/30/2015 10:29:57 AM

Popular Answer

For reverse entity and its relation generations, you should utilize Entity Framework 6 Power Tools Community Edition. You should also use your Entity framework exactly as it was in EDMX.

0
2/1/2019 4:58:37 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