Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EntityConnection::BeginTransaction Method

Entity Framework 6.0
 

Begins a database transaction.

Namespace:   System.Data.Entity.Core.EntityClient
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodBeginTransaction()

Begins a transaction by using the underlying provider.

System_CAPS_pubmethodBeginTransaction(IsolationLevel)

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

Return to top

EntityConnection::BeginTransaction Method ()

Begins a transaction by using the underlying provider.

public:
virtual EntityTransaction^ BeginTransaction()

Return Value

Type: System.Data.Entity.Core.EntityClient::EntityTransaction^

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

Exception Condition
InvalidOperationException

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 .

Return to top

EntityConnection::BeginTransaction Method (IsolationLevel)

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

public:
virtual EntityTransaction^ BeginTransaction(
	IsolationLevel isolationLevel
)

Parameters

isolationLevel
Type: System.Data::IsolationLevel

The isolation level of the transaction.

Return Value

Type: System.Data.Entity.Core.EntityClient::EntityTransaction^

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

Exception Condition
InvalidOperationException

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 .

Return to top
Show: