Allow managing transactions via SQL commands in the update pipeline #27532
Open
Labels
area-perf
area-save-changes
needs-design
punted-for-7.0
Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints.
type-enhancement
Milestone
SaveChanges implicitly starts a transaction around all changes (except where one isn't needed, see #27439). This is done by calling the standard ADO.NET APIs, DbConnection.BeginTransaction and DbTransaction.Commit. Unfortunately, each of these APIs does a roundtrip, so a typical SaveChanges involves 3 roundtrips instead of just one. Some benchmarking:
Benchmark code
We could get around this by managing transactions manually: prepend BEGIN to the first batch, and append COMMIT to the last batch.
Originally discussed in #4351
The text was updated successfully, but these errors were encountered: