Database.BeginTransaction Method (IsolationLevel)
[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]
Begins a transaction on the underlying store connection using the specified isolation level
Namespace: System.Data.Entity
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
Public Function BeginTransaction ( _
isolationLevel As IsolationLevel _
) As DbContextTransaction
'Usage
Dim instance As Database
Dim isolationLevel As IsolationLevel
Dim returnValue As DbContextTransaction
returnValue = instance.BeginTransaction(isolationLevel)
public DbContextTransaction BeginTransaction(
IsolationLevel isolationLevel
)
public:
DbContextTransaction^ BeginTransaction(
IsolationLevel isolationLevel
)
member BeginTransaction :
isolationLevel:IsolationLevel -> DbContextTransaction
public function BeginTransaction(
isolationLevel : IsolationLevel
) : DbContextTransaction
Parameters
- isolationLevel
Type: System.Data.IsolationLevel
The database isolation level with which the underlying store transaction will be created
Return Value
Type: System.Data.Entity.DbContextTransaction
a DbContextTransaction object wrapping access to the underlying store's transaction object