EntityConnection.BeginTransaction EntityConnection.BeginTransaction EntityConnection.BeginTransaction Method

Definition

Overloads

BeginTransaction() BeginTransaction() BeginTransaction()

Begins a transaction by using the underlying provider.

BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel)

Begins a transaction with the specified isolation level by using the underlying provider.

BeginTransaction() BeginTransaction() BeginTransaction()

Begins a transaction by using the underlying provider.

public virtual System.Data.Entity.Core.EntityClient.EntityTransaction BeginTransaction ();
override this.BeginTransaction : unit -> System.Data.Entity.Core.EntityClient.EntityTransaction
Public Overridable Function BeginTransaction () As EntityTransaction

Returns

A new EntityTransaction. The returned EntityTransaction instance can later be associated with the EntityCommand to execute the command under that transaction.

Exceptions

The underlying provider is not known.-or-The call to BeginTransaction() was made on an EntityConnection that already has a current transaction.-or-The state of the EntityConnection is not Open .

BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel)

Begins a transaction with the specified isolation level by using the underlying provider.

public virtual System.Data.Entity.Core.EntityClient.EntityTransaction BeginTransaction (System.Data.IsolationLevel isolationLevel);
override this.BeginTransaction : System.Data.IsolationLevel -> System.Data.Entity.Core.EntityClient.EntityTransaction

Parameters

isolationLevel
IsolationLevel IsolationLevel IsolationLevel

The isolation level of the transaction.

Returns

A new EntityTransaction. The returned EntityTransaction instance can later be associated with the EntityCommand to execute the command under that transaction.

Exceptions

The underlying provider is not known.-or-The call to BeginTransaction() was made on an EntityConnection that already has a current transaction.-or-The state of the EntityConnection is not Open .

Applies to