Share via


RelationalDatabaseFacadeExtensions.BeginTransaction Method

Definition

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