Reputation: 46750
I am writing inserts and updates into a database using Entity Framework. The issue is that I want to do what I used to do with stored procedures, which is make groups of updates and inserts atomic by putting transactions around them. How is this sort of thing possible with linq to Entities/Entity Framework?
Thanks,
Sachin
Upvotes: 0
Views: 132
Reputation: 364279
When you call SaveChanges
it automatically executes everything in single transaction. If you need to group changes into separate transaction you must do them in sequence and call SaveChanges
for each group separately.
Upvotes: 1