Entity Framework executesqlcommand in same transaction as savechanges

entity-framework entity-framework-6

Question

The problem I have is that I need to update 15000 rows by deleting them and reinsert them. This has to happen in a single transaction. When I remove the rows row by row this is very slow. Inserting goes fine.

Is there a possibility to execute an ExecuteSqlCommand statement in the same transaction as the savechanges of the context with the insert statements?

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

Popular Answer

you should use Entity Framework 6 Power Tools Community Edition fro reverse entity and its relation generations and use your Entity framework 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