TransactionContext Class
This class is used by CommitFailureHandler to write and read transaction tracing information from the database. To customize the definition of the transaction table you can derive from this class and override OnModelCreating. Derived classes can be registered using DbConfiguration.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | TransactionContext(DbConnection) | Initializes a new instance of the TransactionContext class. |
Name | Description | |
---|---|---|
![]() | ChangeTracker | Provides access to features of the context that deal with change tracking of entities.(Inherited from DbContext.) |
![]() | Configuration | Provides access to configuration options for the context.(Inherited from DbContext.) |
![]() | Database | Creates a Database instance for this context that allows for creation/deletion/existence checks for the underlying database.(Inherited from DbContext.) |
![]() | Transactions | Gets or sets a DbSet<TEntity> that can be used to read and write TransactionRow instances. |
Name | Description | |
---|---|---|
![]() | Dispose() | Calls the protected Dispose method.(Inherited from DbContext.) |
![]() | Dispose(Boolean) | Disposes the context. The underlying ObjectContext is also disposed if it was created is by this context or ownership was passed to this context when this context was created. The connection to the database ( DbConnection object) is also disposed if it was created is by this context or ownership was passed to this context when this context was created.(Inherited from DbContext.) |
![]() | Entry(Object) | Gets a DbEntityEntry object for the given entity providing access to information about the entity and the ability to perform actions on the entity.(Inherited from DbContext.) |
![]() | Entry<TEntity>(TEntity) | Gets a DbEntityEntry<TEntity> object for the given entity providing access to information about the entity and the ability to perform actions on the entity.(Inherited from DbContext.) |
![]() | Equals(Object) | Determines whether the specified DbContext is equal to the current DbContext.(Inherited from DbContext.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | Returns the hash function for this DBContext.(Inherited from DbContext.) |
![]() | GetType() | Returns the type for the current DbContext.(Inherited from DbContext.) |
![]() | GetValidationErrors() | Validates tracked entities and returns a Collection of DbEntityValidationResult containing validation results.(Inherited from DbContext.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | OnModelCreating(DbModelBuilder) | This method is called when the model for a derived context has been initialized.(Overrides DbContext.OnModelCreating(DbModelBuilder).) |
![]() | SaveChanges() | Saves all changes made in this context to the underlying database.(Inherited from DbContext.) |
![]() | SaveChangesAsync() | Asynchronously saves all changes made in this context to the underlying database.(Inherited from DbContext.) |
![]() | SaveChangesAsync(CancellationToken) | Asynchronously saves all changes made in this context to the underlying database.(Inherited from DbContext.) |
![]() | Set(Type) | |
![]() | Set<TEntity>() | Returns a DbSet<TEntity> instance for access to entities of the given type in the context and the underlying store.(Inherited from DbContext.) |
![]() | ShouldValidateEntity(DbEntityEntry) | Extension point allowing the user to override the default behavior of validating only added and modified entities.(Inherited from DbContext.) |
![]() | ToString() | Returns the string representation of the DbContext.(Inherited from DbContext.) |
![]() | ValidateEntity(DbEntityEntry, IDictionary<Object, Object>) | Extension point allowing the user to customize validation of an entity or filter out validation results. Called by GetValidationErrors.(Inherited from DbContext.) |
By default EF will poll the resolved TransactionContext to check wether the database schema is compatible and will try to modify it accordingly if it's not. To disable this check call Database.SetInitializer<TTransactionContext>(null) where TTransactionContext is the type of the resolved context.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.