DbConnector class

Encapsulates a database connection and any current transaction.

public abstract class DbConnector : IAsyncDisposable, IDisposable

Public Members

name description
static Create(…) Creates a new DbConnector.
abstract Connection { get; } The database connection.
abstract Transaction { get; } The current transaction, if any.
abstract BeginTransaction() Begins a transaction.
abstract BeginTransaction(…) Begins a transaction.
abstract BeginTransactionAsync(…) Begins a transaction. (2 methods)
Command(…) Creates a new command. (3 methods)
abstract CommitTransaction() Commits the current transaction.
abstract CommitTransactionAsync(…) Commits the current transaction.
abstract Dispose() Disposes the connector.
abstract DisposeAsync() Disposes the connector.
abstract GetConnectionAsync(…) Returns the database connection.
abstract OpenConnection() Opens the connection.
abstract OpenConnectionAsync(…) Opens the connection.
abstract RollbackTransaction() Rolls back the current transaction.
abstract RollbackTransactionAsync(…) Rolls back the current transaction.

Protected Members

name description
DbConnector() The default constructor.
abstract ProviderMethods { get; } Special methods provided by the database provider.

See Also