dotnet / dotnet/EntityFramework.Docs

Better explain the differences between ExecuteInTransaction and BeginTransaction

Open
#4,132 4 comments 0 reactions 0 assignees View on GitHub
area-transactions
Dominant language
Mermaid
Stars
1.7k
Forks
2k
Avg merge
7d 23h
Merged PRs (30d)
16

Description

The differences between `ExecuteInTransaction` `(Async)` and `Begin-`/`Commit-`/`RollbackTransaction` are not obvious and should be better explained.

See also https://learn.microsoft.com/en-us/dotnet/api/system.data.entity.database.begintransaction?view=entity-framework-6.2.0

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 1b3f7aa2-df0d-abe1-0c04-13e0fc07286c
* Version Independent ID: b62d9d58-7729-1ec0-70d8-f2491aa2d66b
* Content: [ExecutionStrategyExtensions.ExecuteInTransactionAsync Method (Microsoft.EntityFrameworkCore)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.executionstrategyextensions.executeintransactionasync?view=efcore-6.0)
* Content Source: [dotnet/xml/Microsoft.EntityFrameworkCore/ExecutionStrategyExtensions.xml](https://github.com/dotnet/EntityFramework.ApiDocs/blob/live/dotnet/xml/Microsoft.EntityFrameworkCore/ExecutionStrategyExtensions.xml)
* Product: **ef-core-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **avickers**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.