Share via


DbContextTransaction Class

Definition

Wraps access to the transaction object on the underlying store connection and ensures that the Entity Framework executes commands on the database within the context of that transaction. An instance of this class is retrieved by calling BeginTransaction() on the DbContextDatabase object.

public class DbContextTransaction : IDisposable
type DbContextTransaction = class
    interface IDisposable
Public Class DbContextTransaction
Implements IDisposable
Inheritance
DbContextTransaction
Implements

Properties

UnderlyingTransaction

Gets the database (store) transaction that is underlying this context transaction.

Methods

Commit()

Commits the underlying store transaction

Dispose()

Cleans up this transaction object and ensures the Entity Framework is no longer using that transaction.

Dispose(Boolean)

Releases the resources used by this transaction object

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

GetType()

Gets the Type of the current instance.

Rollback()

Rolls back the underlying store transaction

ToString()

Returns a string that represents the current object.

Applies to