Defines the core behavior of database connections and provides a base class for database-specific connections.
public ref class DbConnection abstract : IDisposable
public ref class DbConnection abstract : System::ComponentModel::Component, IAsyncDisposable, IDisposable, System::Data::IDbConnection
public ref class DbConnection abstract : IDisposable, System::Data::IDbConnection
public ref class DbConnection abstract : System::ComponentModel::Component, IDisposable, System::Data::IDbConnection
public ref class DbConnection abstract : System::ComponentModel::Component, System::Data::IDbConnection
public ref class DbConnection abstract : System::ComponentModel::Component, IAsyncDisposable, System::Data::IDbConnection
public abstract class DbConnection : IDisposable
public abstract class DbConnection : System.ComponentModel.Component, IAsyncDisposable, IDisposable, System.Data.IDbConnection
public abstract class DbConnection : IDisposable, System.Data.IDbConnection
public abstract class DbConnection : System.ComponentModel.Component, IDisposable, System.Data.IDbConnection
public abstract class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection
public abstract class DbConnection : System.ComponentModel.Component, IAsyncDisposable, System.Data.IDbConnection
type DbConnection = class
interface IDisposable
type DbConnection = class
inherit Component
interface IDbConnection
interface IDisposable
interface IAsyncDisposable
type DbConnection = class
interface IDbConnection
interface IDisposable
type DbConnection = class
inherit Component
interface IDbConnection
interface IDisposable
Public MustInherit Class DbConnection
Implements IDisposable
Public MustInherit Class DbConnection
Inherits Component
Implements IAsyncDisposable, IDbConnection, IDisposable
Public MustInherit Class DbConnection
Implements IDbConnection, IDisposable
Public MustInherit Class DbConnection
Inherits Component
Implements IDbConnection, IDisposable
Public MustInherit Class DbConnection
Inherits Component
Implements IDbConnection
Public MustInherit Class DbConnection
Inherits Component
Implements IAsyncDisposable, IDbConnection
When you inherit from DbConnection, you must override the following members: Close(), BeginDbTransaction(IsolationLevel), ChangeDatabase(String), CreateDbCommand(), Open(), and StateChange. You must also provide the following properties: ConnectionString, Database, DataSource, ServerVersion, and State.
Constructors Properties Methods BeginDbTransaction(IsolationLevel)When overridden in a derived class, starts a database transaction.
BeginDbTransactionAsync(IsolationLevel, CancellationToken)Asynchronously starts a database transaction.
BeginTransaction()Starts a database transaction.
BeginTransaction(IsolationLevel)Starts a database transaction with the specified isolation level.
BeginTransactionAsync(CancellationToken)Asynchronously begins a database transaction.
BeginTransactionAsync(IsolationLevel, CancellationToken)Asynchronously begins a database transaction.
ChangeDatabase(String)When overridden in a derived class, changes the current database for an open connection.
ChangeDatabaseAsync(String, CancellationToken)Asynchronously changes the current database for an open connection.
Close()When overridden in a derived class, closes the connection to the database.
CloseAsync()Asynchronously closes the connection to the database.
CreateBatch()Returns a new instance of the provider's class that implements the DbBatch class.
CreateCommand()Creates and returns a DbCommand object associated with the current connection.
CreateDbBatch()When overridden in a derived class, returns a new instance of the provider's class that implements the DbBatch class.
CreateDbCommand()When overridden in a derived class, creates and returns a DbCommand object associated with the current connection.
CreateObjRef(Type)Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject) Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Dispose()Releases all resources used by the Component.
(Inherited from Component) Dispose(Boolean)Releases the unmanaged resources used by the DbConnection and optionally releases the managed resources.
Dispose(Boolean)Releases the unmanaged resources used by the Component and optionally releases the managed resources.
(Inherited from Component) DisposeAsync()Asynchronously disposes the connection object.
EnlistTransaction(Transaction)Enlists in the specified transaction.
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object) GetHashCode()Serves as the default hash function.
(Inherited from Object) GetLifetimeService()Obsolete.
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject) GetSchema()Returns schema information for the data source of this DbConnection.
GetSchema(String, String[])Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.
GetSchema(String)Returns schema information for the data source of this DbConnection using the specified string for the schema name.
GetSchemaAsync(CancellationToken)This is an asynchronous version of GetSchema(). Providers should override with an appropriate implementation. The cancellationToken
can optionally be honored. The default implementation invokes the synchronous GetSchema() call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken
. Exceptions thrown by GetSchema() will be communicated via the returned Task Exception property.
This is the asynchronous version of GetSchema(String). Providers should override with an appropriate implementation. The cancellationToken
can optionally be honored. The default implementation invokes the synchronous GetSchema(String) call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken
. Exceptions thrown by GetSchema(String) will be communicated via the returned Task Exception property.
This is the asynchronous version of GetSchema(String, String[]). Providers should override with an appropriate implementation. The cancellationToken
can optionally be honored. The default implementation invokes the synchronous GetSchema(String, String[]) call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken
. Exceptions thrown by GetSchema(String, String[]) will be communicated via the returned Task Exception property.
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component) GetType()Gets the Type of the current instance.
(Inherited from Object) InitializeLifetimeService()Obsolete.
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject) MemberwiseClone()Creates a shallow copy of the current Object.
(Inherited from Object) MemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject) OnStateChange(StateChangeEventArgs)Raises the StateChange event.
Open()When overridden in a derived class, opens a database connection with the settings specified by the ConnectionString.
OpenAsync()An asynchronous version of Open(), which opens a database connection with the settings specified by the ConnectionString. This method invokes the virtual method OpenAsync(CancellationToken) with CancellationToken.None.
OpenAsync(CancellationToken)This is the asynchronous version of Open(). Providers should override with an appropriate implementation. The cancellation token can optionally be honored.
The default implementation invokes the synchronous Open() call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property.
Do not invoke other methods and properties of the DbConnection
object until the returned Task is complete.
Returns a string that represents the current object.
(Inherited from Object) ToString()Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component) Events Explicit Interface Implementations Extension Methods See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4