Class EntityConnectionContainer
- Namespace
- Z.EntityFramework.Extensions
- Assembly
- Z.EntityFramework.Extensions.dll
An entity connection container.
public class EntityConnectionContainer : IDisposable
- Inheritance
-
EntityConnectionContainer
- Implements
- Inherited Members
Constructors
EntityConnectionContainer(DbContext)
Constructor.
public EntityConnectionContainer(DbContext context)
Parameters
context
DbContextThe context.
Properties
Connection
Gets or sets the connection.
public DbConnection Connection { get; }
Property Value
- DbConnection
The connection.
Context
Gets or sets the context.
public DbContext Context { get; }
Property Value
- DbContext
The context.
State
Gets the state.
public ConnectionState State { get; }
Property Value
- ConnectionState
The state.
Transaction
Gets or sets the transaction.
public DbTransaction Transaction { get; }
Property Value
- DbTransaction
The transaction.
Methods
CreateCommand()
Creates the command.
public DbCommand CreateCommand()
Returns
- DbCommand
The new command.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Open()
Opens this object.
public void Open()
OpenAsync(CancellationToken)
public Task OpenAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken