RelationalDatabaseFacadeExtensions.BeginTransaction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts a new transaction with a given IsolationLevel.
public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction BeginTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.IsolationLevel isolationLevel);
static member BeginTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.IsolationLevel -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function BeginTransaction (databaseFacade As DatabaseFacade, isolationLevel As IsolationLevel) As IDbContextTransaction
Parameters
- databaseFacade
- DatabaseFacade
The DatabaseFacade for the context.
- isolationLevel
- IsolationLevel
The IsolationLevel to use.
Returns
A IDbContextTransaction that represents the started transaction.
Remarks
See Transactions in EF Core for more information and examples.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework