❔ transaction.Rollback(); vs SaveChanges; at the end
Would the records be safe in case AddRange fails if I don't use RollBack?
3 Replies
ef would use transactions by default, as i understand it
if you only have a single
.SaveChanges()
call, then the entire transaction is really redundant
unless you're using a non-default isolation level, for the transaction
EF will execute all the underlying queries within a transaction, if not already inside a transaction contextWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.