Entity Framework executesqlcommand in the same transaction as savechanges

The problem is that I need to update 15,000 rows by deleting them and reinserting them. This should happen in one transaction. When I delete lines in a row line by line, this happens very slowly. The insert is going fine.

Is it possible to execute the ExecuteSqlCommand statement in the same transaction as the savechanges context with insert statements?

+6
source share
1 answer

you must use the Entity Framework 6 Power Tools Community Edition to reverse the entity and its generations of relationships and use your Entity environment, as it did in EDMX

0
source

Source: https://habr.com/ru/post/1609614/


All Articles